2024-10-11 01:20:02 +02:00
|
|
|
---
|
|
|
|
- name: Ghost update
|
|
|
|
hosts: servers
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2024-10-11 17:27:59 +02:00
|
|
|
# Run the first task synchronously to download dependencies.
|
|
|
|
- name: Update gabnotes.org
|
2024-10-11 01:20:02 +02:00
|
|
|
ansible.builtin.command:
|
|
|
|
chdir: /mnt/data/gabnotes.org
|
|
|
|
cmd: ghost update
|
2024-10-11 17:27:59 +02:00
|
|
|
register: gabnotes
|
|
|
|
changed_when: '"Restarting Ghost" in gabnotes.stdout'
|
2024-10-11 01:20:02 +02:00
|
|
|
- name: Start update on voyages-lois.augendre.info
|
|
|
|
ansible.builtin.command:
|
|
|
|
chdir: /mnt/data/voyages-lois.augendre.info
|
|
|
|
cmd: ghost update
|
|
|
|
register: voyages_lois_async
|
2024-10-11 11:14:39 +02:00
|
|
|
changed_when: false
|
2024-10-11 01:20:02 +02:00
|
|
|
async: 300
|
|
|
|
poll: 0
|
|
|
|
- name: Start update on voyages.coccomagnard.fr
|
|
|
|
ansible.builtin.command:
|
|
|
|
chdir: /mnt/data/voyages.coccomagnard.fr
|
|
|
|
cmd: ghost update
|
|
|
|
register: voyages_coccomagnard_async
|
2024-10-11 11:14:39 +02:00
|
|
|
changed_when: false
|
2024-10-11 01:20:02 +02:00
|
|
|
async: 300
|
|
|
|
poll: 0
|
|
|
|
- name: Check voyages-lois.augendre.info
|
|
|
|
ansible.builtin.async_status:
|
|
|
|
jid: "{{ voyages_lois_async.ansible_job_id }}"
|
|
|
|
register: voyages_lois
|
|
|
|
until: voyages_lois.finished
|
|
|
|
changed_when: '"Restarting Ghost" in voyages_lois.stdout'
|
|
|
|
retries: 100
|
|
|
|
delay: 10
|
|
|
|
- name: Check voyages.coccomagnard.fr
|
|
|
|
ansible.builtin.async_status:
|
|
|
|
jid: "{{ voyages_coccomagnard_async.ansible_job_id }}"
|
|
|
|
register: voyages_coccomagnard
|
|
|
|
until: voyages_coccomagnard.finished
|
|
|
|
changed_when: '"Restarting Ghost" in voyages_coccomagnard.stdout'
|
|
|
|
retries: 100
|
|
|
|
delay: 10
|