mirror of
https://github.com/Crocmagnon/ansible.git
synced 2024-11-25 08:48:03 +01:00
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
---
|
|
- name: Ghost update
|
|
hosts: servers
|
|
gather_facts: false
|
|
tasks:
|
|
# Run the first task synchronously to download dependencies.
|
|
- name: Update gabnotes.org
|
|
ansible.builtin.command:
|
|
chdir: /mnt/data/gabnotes.org
|
|
cmd: ghost update
|
|
register: gabnotes
|
|
changed_when: '"Restarting Ghost" in gabnotes.stdout'
|
|
- 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
|
|
changed_when: false
|
|
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
|
|
changed_when: false
|
|
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
|