File tree 8 files changed +33
-70
lines changed
8 files changed +33
-70
lines changed Original file line number Diff line number Diff line change
1
+ v 0.8.2 (12 Sep 2017)
2
+ - Added jenkins_cli_shell_user and jenkins_cli_shell_user_home, to allow better
3
+ configuration of where to configure Jenkins CLI users' SSH keys
4
+ - Improved internal construction of the _jenkins_url variable to avoid possible
5
+ SSL hostname mismatch errors
6
+ - Removed pre-packaged SSH key. Changed to generating when needed
7
+
1
8
v 0.8.1 (11 Sep 2017)
2
9
- Removed ansible RPM package from jenkins_master role
3
10
Original file line number Diff line number Diff line change 1
- # Local path to a private SSH keyfile to upload into the remote system and
2
- # to set as an authorized keyfile for the Jenkins user
3
- jenkins_ssh_keyfile : id_rsa
4
1
# The Java version to install. Older versions are deprecated and will not be
5
2
# supported beyond the EOL support for their packages in the distribution of
6
3
# choice
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 40
40
mode : 0700
41
41
state : directory
42
42
43
- - name : add private SSH key
44
- copy :
45
- src : " {{ jenkins_ssh_keyfile }}"
46
- dest : " {{ jenkins_user_home }}/.ssh/id_rsa"
47
- owner : " {{ jenkins_user }} "
48
- mode : 0600
43
+ - name : generate new SSH key
44
+ command : |-
45
+ ssh-keygen -b 4096 -t rsa -f {{ jenkins_user_home }}/.ssh/id_rsa
46
+ -N '' creates= {{ jenkins_user_home }}/.ssh/id_rsa
47
+ become : true
48
+ become_user : " {{ jenkins_user }} "
49
49
notify : generate public SSH key
50
50
51
51
- name : add ssh keys to authorized_keys for the jenkins user
Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ jenkins_backup: {}
85
85
# cleanup_diffs: false
86
86
# next_build_number: false
87
87
# move_to_zip: false
88
+ # The shell user on the master system whose SSH key is configured with admin access
89
+ # on the Jenkins CLI. Also, the home directory for that user
90
+ jenkins_cli_shell_user : " {{ jenkins_user }}"
91
+ jenkins_cli_shell_user_home : " {{ jenkins_user_home }}"
88
92
89
93
90
94
# ############################################################################
Original file line number Diff line number Diff line change 1
- - name : set listening port
1
+ - name : check for running in a container
2
2
set_fact :
3
- _listening_port : " {{ https_enabled | ternary(443, 80 ) }}"
4
- when : ansible_connection ! = 'docker'
3
+ _listening_port : " {{ https_enabled | ternary(8443, 8080 ) }}"
4
+ when : ansible_connection = = 'docker'
5
5
tags :
6
6
- jenkins_check_mode
7
7
8
- - name : check for running in a container
8
+ - name : discover valid hostname
9
9
set_fact :
10
- _listening_port : " {{ https_enabled | ternary(8443, 8080) }}"
11
- when : ansible_connection == 'docker'
10
+ _jenkins_host : " {{ ansible_host | default(inventory_hostname | default('localhost')) }}"
12
11
tags :
13
12
- jenkins_check_mode
14
13
15
14
- name : construct Jenkins URL
16
15
set_fact :
17
- _jenkins_url : " http{{ https_enabled | ternary('s', '') }}://localhost:{{ _listening_port }}"
16
+ _jenkins_url : " http{{ https_enabled | ternary('s', '') }}://{{ _jenkins_host }}"
17
+ tags :
18
+ - jenkins_check_mode
19
+
20
+ - name : modify Jenkins URL for non-standard ports
21
+ set_fact :
22
+ _jenkins_url : " {{ _jenkins_url }}:{{ _listening_port }}"
23
+ when : _listening_port is defined
18
24
tags :
19
25
- jenkins_check_mode
20
26
46
52
remoting : " {{ jenkins_cli_remoting }}"
47
53
register : jenkins_admin_api_key
48
54
become : true
49
- become_user : " {{ jenkins_user }}"
55
+ become_user : " {{ jenkins_cli_shell_user }}"
50
56
51
57
- name : save API key
52
58
set_fact :
Original file line number Diff line number Diff line change 47
47
jenkins_cli_user :
48
48
jenkins_home : " {{ jenkins_home }}"
49
49
jenkins_user : " {{ item }}"
50
- key_file : " {{ jenkins_user_home }}/.ssh/id_rsa.pub"
50
+ key_file : " {{ jenkins_cli_shell_user_home }}/.ssh/id_rsa.pub"
51
51
state : present
52
52
become : true
53
53
notify : restart Jenkins
Original file line number Diff line number Diff line change 9
9
10
10
setup (
11
11
name = 'cinch' ,
12
- version = '0.8.1 ' ,
12
+ version = '0.8.2 ' ,
13
13
description = 'Cinch continuous integration setup' ,
14
14
long_description = description ,
15
15
url = 'https://github.com/RedHatQE/cinch' ,
You can’t perform that action at this time.
0 commit comments