ansible/roles/ghost/tasks/main.yaml
Gabriel Augendre 91f84be4d1
Some checks failed
/ run ansible (push) Has been cancelled
ghost: block spam email domains
2025-01-24 22:38:33 +01:00

22 lines
712 B
YAML

---
- 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 {{ ghost_site }}
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- 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 }}
register: update
changed_when: '"Restarting Ghost" in update.stdout'