We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06ae09b commit bede7aeCopy full SHA for bede7ae
ansible/bootstrap.yml
@@ -8,7 +8,16 @@
8
stat:
9
path: /etc/systemd/system/ansible-init.service
10
register: _stat_ansible_init_unitfile
11
-
+ - name: Check ansible-init status
12
+ command: systemctl is-failed ansible-init
13
+ register: _ansible_init_failed
14
+ failed_when: false # rc != 0 for non-failure!
15
+ changed_when: false
16
+ - name: Check ansible-init hasn't failed (yet)
17
+ # NB: only allows early exit if it has, does not catch future failures!
18
+ assert:
19
+ that: "'failed' not in _ansible_init_failed.stdout"
20
+ fail_msg: "ansible-init has failed - check journalctl -xeu ansible-init"
21
- name: Wait for ansible-init to finish
22
wait_for:
23
path: /var/lib/ansible-init.done
0 commit comments