infrastructure/roles/mastodon/handlers/main.yml

84 lines
2.3 KiB
YAML

- name: Apply new SELinux file context to filesystem.
ansible.builtin.command: "restorecon -irF {{ mastodon_install_location }}"
become: true
listen: "mastodon selinux context changed"
changed_when: false
- name: Restart mastodon web service.
ansible.builtin.systemd:
state: restarted
name: mastodon-web.service
daemon_reload: true
become: true
listen:
- "mastodon web service changed"
- "mastodon selinux context changed"
- "mastodon postgres socket changed"
- "mastodon redis socket changed"
- "mastodon env changed"
- name: Restart mastodon streaming service.
ansible.builtin.systemd:
state: restarted
name: mastodon-streaming.service
daemon_reload: true
become: true
listen:
- "mastodon streaming service changed"
- "mastodon selinux context changed"
- "mastodon postgres socket changed"
- "mastodon redis socket changed"
- "mastodon env changed"
- name: Restart mastodon sidekiq service.
ansible.builtin.systemd:
state: restarted
name: mastodon-sidekiq.service
daemon_reload: true
become: true
listen:
- "mastodon sidekiq service changed"
- "mastodon selinux context changed"
- "mastodon postgres socket changed"
- "mastodon redis socket changed"
- "mastodon env changed"
- name: Restart mastodon postgres service.
ansible.builtin.systemd:
state: restarted
name: mastodon-postgres.service
daemon_reload: true
become: true
listen:
- "mastodon postgres service changed"
- "mastodon selinux context changed"
- name: Restart mastodon redis service.
ansible.builtin.systemd:
state: restarted
name: mastodon-redis.service
daemon_reload: true
become: true
listen:
- "mastodon redis service changed"
- "mastodon selinux context changed"
- name: Restart mastodon nginx service.
ansible.builtin.systemd:
state: restarted
name: mastodon-nginx.service
daemon_reload: true
become: true
listen:
- "mastodon nginx service changed"
- "mastodon selinux context changed"
- name: Restart mastodon elasticsearch service.
ansible.builtin.systemd:
state: restarted
name: mastodon-elasticsearch.service
daemon_reload: true
become: true
listen:
- "mastodon elasticsearch service changed"
- "mastodon selinux context changed"