2020-02-20 23:26:43 +03:00
|
|
|
---
|
|
|
|
- name: Converge
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
|
|
|
|
pre_tasks:
|
|
|
|
- name: Update apt cache.
|
|
|
|
apt: update_cache=yes cache_valid_time=600
|
|
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
|
2020-04-03 21:01:43 +03:00
|
|
|
- name: Wait for systemd to complete initialization. # noqa 303
|
2020-04-03 20:01:47 +03:00
|
|
|
command: systemctl is-system-running
|
|
|
|
register: systemctl_status
|
2020-04-03 21:01:43 +03:00
|
|
|
until: >
|
2020-04-03 20:22:16 +03:00
|
|
|
'running' in systemctl_status.stdout or
|
2020-04-03 20:27:59 +03:00
|
|
|
'degraded' in systemctl_status.stdout
|
2020-04-03 20:01:47 +03:00
|
|
|
retries: 30
|
|
|
|
delay: 5
|
2020-04-03 18:51:21 +03:00
|
|
|
when: ansible_service_mgr == 'systemd'
|
|
|
|
changed_when: false
|
2020-04-03 21:01:43 +03:00
|
|
|
failed_when: systemctl_status.rc > 1
|
2020-04-03 18:51:21 +03:00
|
|
|
|
2020-02-20 23:26:43 +03:00
|
|
|
roles:
|
|
|
|
- role: geerlingguy.docker
|