File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,3 +7,5 @@ install_python_requirements:
77 pip3 install hcloud
88generate_jenkins_password:
99 @if ! [ -f jenkins_password ]; then openssl rand -base64 32 | tr -d '\n\r' > jenkins_password; fi
10+ get_jenkins_password:
11+ @cat jenkins_password | clip.exe
Original file line number Diff line number Diff line change 55
66- name: Install Jenkins
77 hosts: jenkins
8-
8+ vars:
9+ jenkins_hostname: jenkins.katujemy.kacik.it
10+
911 roles:
1012 - role: geerlingguy.java
1113 - role: geerlingguy.jenkins
1214 vars:
13- jenkins_hostname: jenkins.katujemy.kacik.it
1415 java_packages:
1516 - openjdk-11-jdk
1617 jenkins_plugins:
2122 - job-dsl
2223 # jenkins_plugins_state: latest
2324 jenkins_admin_password: "{{ lookup('file', 'jenkins_password') }}"
24- - role: wcm_io_devops.jenkins_configuration_as_code
25+
26+ tasks:
27+ - name: Wait for Jenkins to start up before proceeding.
28+ uri:
29+ url: "http://{{ jenkins_hostname }}:8080/cli/"
30+ method: GET
31+ return_content: "yes"
32+ timeout: 5
33+ body_format: raw
34+ follow_redirects: "no"
35+ status_code: 200,403
36+ register: result
37+ until: (result.status == 403 or result.status == 200) and (result.content.find("Please wait while") == -1)
38+ retries: "{{ jenkins_connection_retries }}"
39+ delay: "{{ jenkins_connection_delay }}"
40+ changed_when: false
41+ check_mode: false
42+ - name: Import JCasC role
43+ import_role:
44+ name: wcm_io_devops.jenkins_configuration_as_code
2545 vars:
2646 jenkins_casc_config_path_configure: true
2747 jenkins_casc_config_path: "/var/lib/jenkins/jcasc-folder"
28- jenkins_casc_jenkins_hostname: jenkins.katujemy.kacik.it
48+ jenkins_casc_jenkins_hostname: "{{ jenkins_hostname }}"
2949 jenkins_casc_config_fileglobs:
3050 - jcasc/jenkins_config.yml
3151 jenkins_casc_admin_password: "{{ lookup('file', 'jenkins_password') }}"
3252 jenkins_casc_plugins_present: []
33- tasks:
3453 - name: adding jenkins user to group docker
3554 user:
3655 name: jenkins
You can’t perform that action at this time.
0 commit comments