forked from ISTI-ansible-roles/ansible-roles
Do not fail if a plugin do not install.
This commit is contained in:
parent
2a188a11f4
commit
5f46719ad8
|
@ -18,6 +18,8 @@
|
||||||
user: name={{ jenkins_username }} generate_ssh_key=True
|
user: name={{ jenkins_username }} generate_ssh_key=True
|
||||||
delegate_to: '{{ item }}'
|
delegate_to: '{{ item }}'
|
||||||
with_items: '{{ groups.jenkins_master }}'
|
with_items: '{{ groups.jenkins_master }}'
|
||||||
|
when: ansible_fqdn == '{{ jenkins_master_hostname }}'
|
||||||
|
run_once: True
|
||||||
|
|
||||||
- name: Get the master ssh keys
|
- name: Get the master ssh keys
|
||||||
become: True
|
become: True
|
||||||
|
|
|
@ -35,12 +35,14 @@
|
||||||
when: item.version is not defined
|
when: item.version is not defined
|
||||||
with_items: '{{ jenkins_plugins }}'
|
with_items: '{{ jenkins_plugins }}'
|
||||||
notify: Restart jenkins
|
notify: Restart jenkins
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: Install plugins with a specific version
|
- name: Install plugins with a specific version
|
||||||
jenkins_plugin: name="{{ item.name }}" state={{ item.state | default('latest') }} version='{{ item.version }}' url={{ jenkins_local_url }} url_username={{ jenkins_access_params.url_username }} url_password={{ jenkins_access_params.url_password }}
|
jenkins_plugin: name="{{ item.name }}" state={{ item.state | default('latest') }} version='{{ item.version }}' url={{ jenkins_local_url }} url_username={{ jenkins_access_params.url_username }} url_password={{ jenkins_access_params.url_password }}
|
||||||
when: item.version is defined
|
when: item.version is defined
|
||||||
with_items: '{{ jenkins_plugins }}'
|
with_items: '{{ jenkins_plugins }}'
|
||||||
notify: Restart jenkins
|
notify: Restart jenkins
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
become_user: '{{ jenkins_username }}'
|
become_user: '{{ jenkins_username }}'
|
||||||
|
|
Loading…
Reference in New Issue