Add retries to package installations
Change-Id: Ifc1e3be7cfec4e6447c32fbf7b8f7c87010da679
This commit is contained in:
parent
3012252ad7
commit
beb9f6ac6a
@ -20,8 +20,13 @@
|
|||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: "{{ cache_timeout }}"
|
cache_valid_time: "{{ cache_timeout }}"
|
||||||
when: ansible_pkg_mgr == 'apt'
|
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr == 'apt'
|
||||||
|
register: refresh_cache
|
||||||
|
until: refresh_cache is success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
- name: Ensure OpenStack CI image has a logrotate cron job
|
- name: Ensure OpenStack CI image has a logrotate cron job
|
||||||
file:
|
file:
|
||||||
path: /etc/cron.daily/logrotate
|
path: /etc/cron.daily/logrotate
|
||||||
@ -32,8 +37,13 @@
|
|||||||
package:
|
package:
|
||||||
name: dconf
|
name: dconf
|
||||||
state: installed
|
state: installed
|
||||||
when: ansible_os_family == 'RedHat'
|
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
when:
|
||||||
|
- ansible_os_family == 'RedHat'
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages is success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
roles:
|
roles:
|
||||||
- role: "ansible-hardening"
|
- role: "ansible-hardening"
|
||||||
vars:
|
vars:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user