ansible/roles/ghost/tasks/main.yaml

21 lines
633 B
YAML
Raw Permalink Normal View History

2024-10-20 22:22:18 +02:00
---
- name: Write config files for {{ ghost_site }}
ansible.builtin.template:
src: templates/ghost/{{ ghost_filename }}
dest: /mnt/data/{{ ghost_site }}/config.production.json
mode: "0664"
notify:
- Restart service
- name: Ensure service is started {{ ghost_site }}
ansible.builtin.command:
cmd: ghost start
chdir: /mnt/data/{{ ghost_site }}
register: start
changed_when: '"Starting Ghost" in start.stdout'
- name: Update {{ ghost_site }}
ansible.builtin.command:
cmd: ghost update
chdir: /mnt/data/{{ ghost_site }}
2024-10-20 22:30:42 +02:00
register: update
changed_when: '"Restarting Ghost" in update.stdout'