Optimize uninstall tasks a bit

- forego removing Docker images - it's not effective anyway, because it
  only removes the last version.. which is a drop in the bucket, usually

- do not reload systemd - it's none of our business. `--tags=start`,
  etc., handle this

- combine all uninstall tasks under a single block, which only runs if
  we detect traces (a leftover systemd .service file) of the component.
  If no such .service is detected, we skip them all. This may lead to
  incorect cleanup in rare cases, but is good enough for the most part.
development
Slavi Pantaleev 2 years ago
parent 8456657f21
commit a04f6f4e3d

@ -1,41 +1,25 @@
--- ---
- name: Check existence of matrix-backup-borg service - name: Check existence of matrix-backup-borg service
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
register: matrix_backup_borg_service_stat register: matrix_backup_borg_service_stat
- name: Ensure matrix-backup-borg is stopped - when: matrix_backup_borg_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-backup-borg - name: Ensure matrix-backup-borg is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-backup-borg
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_backup_borg_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-backup-borg.service doesn't exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
state: absent
when: "matrix_backup_borg_service_stat.stat.exists | bool"
- name: Ensure matrix-backup-borg.timer doesn't exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer"
state: absent
when: "matrix_backup_borg_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-backup-borg.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_backup_borg_service_stat.stat.exists | bool"
- name: Ensure Matrix borg paths don't exist - name: Ensure matrix-backup-borg.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_backup_borg_base_path }}" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
state: absent state: absent
- name: Ensure borg Docker image doesn't exist - name: Ensure matrix-backup-borg.timer doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_backup_borg_docker_image }}" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
register: matrix_bot_buscarron_service_stat register: matrix_bot_buscarron_service_stat
- name: Ensure matrix-buscarron is stopped - when: matrix_bot_buscarron_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-buscarron - name: Ensure matrix-buscarron is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-buscarron
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_buscarron_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-buscarron.service doesn't exist - name: Ensure matrix-bot-buscarron.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
state: absent state: absent
when: "matrix_bot_buscarron_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-buscarron.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_buscarron_service_stat.stat.exists | bool"
- name: Ensure Matrix buscarron paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_buscarron_base_path }}"
state: absent
- name: Ensure buscarron Docker image doesn't exist - name: Ensure Matrix buscarron paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_buscarron_docker_image }}" path: "{{ matrix_bot_buscarron_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service"
register: matrix_bot_go_neb_service_stat register: matrix_bot_go_neb_service_stat
- name: Ensure matrix-go-neb is stopped - when: matrix_bot_go_neb_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-go-neb - name: Ensure matrix-go-neb is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-go-neb
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_go_neb_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-go-neb.service doesn't exist - name: Ensure matrix-bot-go-neb.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service"
state: absent state: absent
when: "matrix_bot_go_neb_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-go-neb.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_go_neb_service_stat.stat.exists | bool"
- name: Ensure Matrix go-neb paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_go_neb_base_path }}"
state: absent
- name: Ensure go-neb Docker image doesn't exist - name: Ensure Matrix go-neb paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_go_neb_docker_image }}" path: "{{ matrix_bot_go_neb_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
register: matrix_bot_honoroit_service_stat register: matrix_bot_honoroit_service_stat
- name: Ensure matrix-honoroit is stopped - when: matrix_bot_honoroit_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-honoroit - name: Ensure matrix-honoroit is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-honoroit
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_honoroit_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-honoroit.service doesn't exist - name: Ensure matrix-bot-honoroit.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
state: absent state: absent
when: "matrix_bot_honoroit_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-honoroit.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_honoroit_service_stat.stat.exists | bool"
- name: Ensure Matrix honoroit paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_honoroit_base_path }}"
state: absent
- name: Ensure honoroit Docker image doesn't exist - name: Ensure Matrix honoroit paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_honoroit_docker_image }}" path: "{{ matrix_bot_honoroit_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service"
register: matrix_bot_matrix_registration_bot_service_stat register: matrix_bot_matrix_registration_bot_service_stat
- name: Ensure matrix-matrix-registration-bot is stopped - when: matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-matrix-registration-bot - name: Ensure matrix-matrix-registration-bot is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-matrix-registration-bot
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist - name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service"
state: absent state: absent
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-matrix-registration-bot.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool"
- name: Ensure Matrix matrix-registration-bot paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_matrix_registration_bot_base_path }}"
state: absent
- name: Ensure matrix-registration-bot Docker image doesn't exist - name: Ensure Matrix matrix-registration-bot paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_matrix_registration_bot_docker_image }}" path: "{{ matrix_bot_matrix_registration_bot_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service"
register: matrix_bot_matrix_reminder_bot_service_stat register: matrix_bot_matrix_reminder_bot_service_stat
- name: Ensure matrix-matrix-reminder-bot is stopped - when: matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-matrix-reminder-bot - name: Ensure matrix-matrix-reminder-bot is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-matrix-reminder-bot
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-matrix-reminder-bot.service doesn't exist - name: Ensure matrix-bot-matrix-reminder-bot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service"
state: absent state: absent
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-matrix-reminder-bot.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool"
- name: Ensure Matrix matrix-reminder-bot paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_matrix_reminder_bot_base_path }}"
state: absent
- name: Ensure matrix-reminder-bot Docker image doesn't exist - name: Ensure Matrix matrix-reminder-bot paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_matrix_reminder_bot_docker_image }}" path: "{{ matrix_bot_matrix_reminder_bot_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
register: matrix_bot_maubot_service_stat register: matrix_bot_maubot_service_stat
- name: Ensure matrix-bot-maubot is stopped - when: matrix_bot_maubot_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-maubot - name: Ensure matrix-bot-maubot is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-maubot
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_maubot_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-maubot.service doesn't exist - name: Ensure matrix-bot-maubot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
state: absent state: absent
when: "matrix_bot_maubot_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-maubot.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_maubot_service_stat.stat.exists | bool"
- name: Ensure Matrix maubot paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_maubot_base_path }}"
state: absent
- name: Ensure maubot Docker image doesn't exist - name: Ensure Matrix maubot paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_maubot_docker_image }}" path: "{{ matrix_bot_maubot_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service"
register: matrix_bot_mjolnir_service_stat register: matrix_bot_mjolnir_service_stat
- name: Ensure matrix-bot-mjolnir is stopped - when: matrix_bot_mjolnir_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-mjolnir - name: Ensure matrix-bot-mjolnir is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-mjolnir
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_mjolnir_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-mjolnir.service doesn't exist - name: Ensure matrix-bot-mjolnir.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service"
state: absent state: absent
when: "matrix_bot_mjolnir_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-mjolnir.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_mjolnir_service_stat.stat.exists | bool"
- name: Ensure matrix-bot-mjolnir paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_mjolnir_base_path }}"
state: absent
- name: Ensure mjolnir Docker image doesn't exist - name: Ensure matrix-bot-mjolnir paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_mjolnir_docker_image }}" path: "{{ matrix_bot_mjolnir_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
register: matrix_bot_postmoogle_service_stat register: matrix_bot_postmoogle_service_stat
- name: Ensure matrix-postmoogle is stopped - when: matrix_bot_postmoogle_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-bot-postmoogle - name: Ensure matrix-postmoogle is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-bot-postmoogle
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_bot_postmoogle_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-bot-postmoogle.service doesn't exist - name: Ensure matrix-bot-postmoogle.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
state: absent state: absent
when: "matrix_bot_postmoogle_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-bot-postmoogle.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_postmoogle_service_stat.stat.exists | bool"
- name: Ensure Matrix postmoogle paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_postmoogle_base_path }}"
state: absent
- name: Ensure postmoogle Docker image doesn't exist - name: Ensure Matrix postmoogle paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_bot_postmoogle_docker_image }}" path: "{{ matrix_bot_postmoogle_base_path }}"
state: absent state: absent

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service"
register: matrix_appservice_discord_service_stat register: matrix_appservice_discord_service_stat
- name: Ensure matrix-appservice-discord is stopped - when: matrix_appservice_discord_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-appservice-discord - name: Ensure matrix-appservice-discord is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-appservice-discord
daemon_reload: true state: stopped
when: "matrix_appservice_discord_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-appservice-discord.service doesn't exist - name: Ensure matrix-appservice-discord.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service"
state: absent state: absent
when: "matrix_appservice_discord_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-appservice-discord.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_discord_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
register: matrix_appservice_irc_service_stat register: matrix_appservice_irc_service_stat
- name: Ensure matrix-appservice-irc is stopped - when: matrix_appservice_irc_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-appservice-irc - name: Ensure matrix-appservice-irc is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-appservice-irc
daemon_reload: true state: stopped
when: "matrix_appservice_irc_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-appservice-irc.service doesn't exist - name: Ensure matrix-appservice-irc.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
state: absent state: absent
when: "matrix_appservice_irc_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-appservice-irc.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_irc_service_stat.stat.exists"

@ -11,7 +11,7 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
when: "matrix_appservice_kakaotalk_service_stat.stat.exists" when: matrix_appservice_kakaotalk_service_stat.stat.exists | bool
- name: Check existence of matrix-appservice-kakaotalk-node service - name: Check existence of matrix-appservice-kakaotalk-node service
ansible.builtin.stat: ansible.builtin.stat:
@ -24,7 +24,7 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
when: "matrix_appservice_kakaotalk_node_service_stat.stat.exists" when: matrix_appservice_kakaotalk_node_service_stat.stat.exists | bool
- name: Ensure matrix-appservice-kakaotalk.service files don't exist - name: Ensure matrix-appservice-kakaotalk.service files don't exist
ansible.builtin.file: ansible.builtin.file:
@ -33,9 +33,4 @@
with_items: with_items:
- "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service" - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service"
- "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service" - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service"
when: "matrix_appservice_kakaotalk_service_stat.stat.exists" when: matrix_appservice_kakaotalk_service_stat.stat.exists | bool or matrix_appservice_kakaotalk_node_service_stat.stat.exists | bool
- name: Ensure systemd reloaded after matrix-appservice-kakaotalk service files removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_kakaotalk_service_stat.stat.exists or matrix_appservice_kakaotalk_node_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service"
register: matrix_appservice_slack_service_stat register: matrix_appservice_slack_service_stat
- name: Ensure matrix-appservice-slack is stopped - when: matrix_appservice_slack_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-appservice-slack - name: Ensure matrix-appservice-slack is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-appservice-slack
daemon_reload: true state: stopped
when: "matrix_appservice_slack_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-appservice-slack.service doesn't exist - name: Ensure matrix-appservice-slack.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service"
state: absent state: absent
when: "matrix_appservice_slack_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-appservice-slack.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_slack_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service"
register: matrix_appservice_webhooks_service_stat register: matrix_appservice_webhooks_service_stat
- name: Ensure matrix-appservice-webhooks is stopped - when: matrix_appservice_webhooks_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-appservice-webhooks - name: Ensure matrix-appservice-webhooks is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-appservice-webhooks
daemon_reload: true state: stopped
when: "matrix_appservice_webhooks_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-appservice-webhooks.service doesn't exist - name: Ensure matrix-appservice-webhooks.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service"
state: absent state: absent
when: "matrix_appservice_webhooks_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-appservice-webhooks.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_webhooks_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service"
register: matrix_beeper_linkedin_service_stat register: matrix_beeper_linkedin_service_stat
- name: Ensure matrix-beeper-linkedin is stopped - when: matrix_beeper_linkedin_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-beeper-linkedin - name: Ensure matrix-beeper-linkedin is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-beeper-linkedin
daemon_reload: true state: stopped
when: "matrix_beeper_linkedin_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-beeper-linkedin.service doesn't exist - name: Ensure matrix-beeper-linkedin.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service"
state: absent state: absent
when: "matrix_beeper_linkedin_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_beeper_linkedin_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-go-skype-bridge.service" path: "/etc/systemd/system/matrix-go-skype-bridge.service"
register: matrix_go_skype_bridge_service_stat register: matrix_go_skype_bridge_service_stat
- name: Ensure matrix-go-skype-bridge is stopped - when: matrix_go_skype_bridge_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-go-skype-bridge - name: Ensure matrix-go-skype-bridge is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-go-skype-bridge
daemon_reload: true state: stopped
when: "matrix_go_skype_bridge_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-go-skype-bridge.service doesn't exist - name: Ensure matrix-go-skype-bridge.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-go-skype-bridge.service" path: "/etc/systemd/system/matrix-go-skype-bridge.service"
state: absent state: absent
when: "matrix_go_skype_bridge_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-go-skype-bridge.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_go_skype_bridge_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
register: matrix_heisenbridge_service_stat register: matrix_heisenbridge_service_stat
- name: Ensure matrix-heisenbridge is stopped - when: matrix_heisenbridge_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-heisenbridge - name: Ensure matrix-heisenbridge is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-heisenbridge
daemon_reload: true state: stopped
when: "matrix_heisenbridge_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-heisenbridge.service doesn't exist - name: Ensure matrix-heisenbridge.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
state: absent state: absent
when: "matrix_heisenbridge_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-heisenbridge.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_heisenbridge_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service"
register: matrix_hookshot_service_stat register: matrix_hookshot_service_stat
- name: Ensure matrix-hookshot is stopped - when: matrix_hookshot_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-hookshot - name: Ensure matrix-hookshot is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-hookshot
daemon_reload: true state: stopped
when: "matrix_hookshot_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-hookshot.service doesn't exist - name: Ensure matrix-hookshot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service"
state: absent state: absent
when: "matrix_hookshot_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-hookshot.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_hookshot_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service"
register: matrix_mautrix_discord_service_stat register: matrix_mautrix_discord_service_stat
- name: Ensure matrix-mautrix-discord is stopped - when: matrix_mautrix_discord_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-discord - name: Ensure matrix-mautrix-discord is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-discord
daemon_reload: true state: stopped
when: "matrix_mautrix_discord_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-discord.service doesn't exist - name: Ensure matrix-mautrix-discord.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service"
state: absent state: absent
when: "matrix_mautrix_discord_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-discord.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_discord_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service"
register: matrix_mautrix_facebook_service_stat register: matrix_mautrix_facebook_service_stat
- name: Ensure matrix-mautrix-facebook is stopped - when: matrix_mautrix_facebook_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-facebook - name: Ensure matrix-mautrix-facebook is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-facebook
daemon_reload: true state: stopped
when: "matrix_mautrix_facebook_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-facebook.service doesn't exist - name: Ensure matrix-mautrix-facebook.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service"
state: absent state: absent
when: "matrix_mautrix_facebook_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-facebook.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_facebook_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service"
register: matrix_mautrix_googlechat_service_stat register: matrix_mautrix_googlechat_service_stat
- name: Ensure matrix-mautrix-googlechat is stopped - when: matrix_mautrix_googlechat_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-googlechat - name: Ensure matrix-mautrix-googlechat is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-googlechat
daemon_reload: true state: stopped
when: "matrix_mautrix_googlechat_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-googlechat.service doesn't exist - name: Ensure matrix-mautrix-googlechat.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service"
state: absent state: absent
when: "matrix_mautrix_googlechat_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-googlechat.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_googlechat_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service"
register: matrix_mautrix_hangouts_service_stat register: matrix_mautrix_hangouts_service_stat
- name: Ensure matrix-mautrix-hangouts is stopped - when: matrix_mautrix_hangouts_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-hangouts - name: Ensure matrix-mautrix-hangouts is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-hangouts
daemon_reload: true state: stopped
when: "matrix_mautrix_hangouts_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-hangouts.service doesn't exist - name: Ensure matrix-mautrix-hangouts.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service"
state: absent state: absent
when: "matrix_mautrix_hangouts_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-hangouts.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_hangouts_service_stat.stat.exists"

@ -4,21 +4,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service"
register: matrix_mautrix_instagram_service_stat register: matrix_mautrix_instagram_service_stat
- name: Ensure matrix-mautrix-instagram is stopped - when: matrix_mautrix_instagram_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-instagram - name: Ensure matrix-mautrix-instagram is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-instagram
daemon_reload: true state: stopped
when: "matrix_mautrix_instagram_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-instagram.service doesn't exist - name: Ensure matrix-mautrix-instagram.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service"
state: absent state: absent
when: "matrix_mautrix_instagram_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-instagram.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_instagram_service_stat.stat.exists"

@ -6,19 +6,19 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service"
register: matrix_mautrix_signal_daemon_service_stat register: matrix_mautrix_signal_daemon_service_stat
- name: Ensure matrix-mautrix-signal-daemon is stopped - when: matrix_mautrix_signal_daemon_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-signal-daemon - name: Ensure matrix-mautrix-signal-daemon is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-signal-daemon
daemon_reload: true state: stopped
when: "matrix_mautrix_signal_daemon_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-signal-daemon.service doesn't exist - name: Ensure matrix-mautrix-signal-daemon.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service"
state: absent state: absent
when: "matrix_mautrix_signal_daemon_service_stat.stat.exists"
# Bridge service # Bridge service
- name: Check existence of matrix-mautrix-signal service - name: Check existence of matrix-mautrix-signal service
@ -26,22 +26,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service"
register: matrix_mautrix_signal_service_stat register: matrix_mautrix_signal_service_stat
- name: Ensure matrix-mautrix-signal is stopped - when: matrix_mautrix_signal_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-signal - name: Ensure matrix-mautrix-signal is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-signal
daemon_reload: true state: stopped
when: "matrix_mautrix_signal_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-signal.service doesn't exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service"
state: absent
when: "matrix_mautrix_signal_service_stat.stat.exists"
# All services - name: Ensure matrix-mautrix-signal.service doesn't exist
- name: Ensure systemd reloaded after matrix-mautrix-signal_X.service removal ansible.builtin.file:
ansible.builtin.service: path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service"
daemon_reload: true state: absent
when: "matrix_mautrix_signal_service_stat.stat.exists or matrix_mautrix_signal_daemon_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
register: matrix_mautrix_telegram_service_stat register: matrix_mautrix_telegram_service_stat
- name: Ensure matrix-mautrix-telegram is stopped - when: matrix_mautrix_telegram_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-telegram - name: Ensure matrix-mautrix-telegram is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-telegram
daemon_reload: true state: stopped
when: "matrix_mautrix_telegram_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-telegram.service doesn't exist - name: Ensure matrix-mautrix-telegram.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
state: absent state: absent
when: "matrix_mautrix_telegram_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-telegram.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_telegram_service_stat.stat.exists"

@ -5,20 +5,15 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
register: matrix_mautrix_twitter_service_stat register: matrix_mautrix_twitter_service_stat
- name: Ensure matrix-mautrix-twitter is stopped - when: matrix_mautrix_twitter_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-twitter - name: Ensure matrix-mautrix-twitter is stopped
state: stopped ansible.builtin.service:
daemon_reload: true name: matrix-mautrix-twitter
when: "matrix_mautrix_twitter_service_stat.stat.exists" state: stopped
daemon_reload: true
- name: Ensure matrix-mautrix-twitter.service doesn't exist - name: Ensure matrix-mautrix-twitter.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
state: absent state: absent
when: "matrix_mautrix_twitter_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-twitter.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_twitter_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
register: matrix_mautrix_whatsapp_service_stat register: matrix_mautrix_whatsapp_service_stat
- name: Ensure matrix-mautrix-whatsapp is stopped - when: matrix_mautrix_whatsapp_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mautrix-whatsapp - name: Ensure matrix-mautrix-whatsapp is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mautrix-whatsapp
daemon_reload: true state: stopped
when: "matrix_mautrix_whatsapp_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mautrix-whatsapp.service doesn't exist - name: Ensure matrix-mautrix-whatsapp.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
state: absent state: absent
when: "matrix_mautrix_whatsapp_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mautrix-whatsapp.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_whatsapp_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-discord.service" path: "/etc/systemd/system/matrix-mx-puppet-discord.service"
register: matrix_mx_puppet_discord_service_stat register: matrix_mx_puppet_discord_service_stat
- name: Ensure matrix-mx-puppet-discord is stopped - when: matrix_mx_puppet_discord_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-discord - name: Ensure matrix-mx-puppet-discord is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-discord
daemon_reload: true state: stopped
when: "matrix_mx_puppet_discord_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-discord.service doesn't exist - name: Ensure matrix-mx-puppet-discord.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-discord.service" path: "/etc/systemd/system/matrix-mx-puppet-discord.service"
state: absent state: absent
when: "matrix_mx_puppet_discord_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-discord.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_discord_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-groupme.service" path: "/etc/systemd/system/matrix-mx-puppet-groupme.service"
register: matrix_mx_puppet_groupme_service_stat register: matrix_mx_puppet_groupme_service_stat
- name: Ensure matrix-mx-puppet-groupme is stopped - when: matrix_mx_puppet_groupme_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-groupme - name: Ensure matrix-mx-puppet-groupme is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-groupme
daemon_reload: true state: stopped
when: "matrix_mx_puppet_groupme_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-groupme.service doesn't exist - name: Ensure matrix-mx-puppet-groupme.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-groupme.service" path: "/etc/systemd/system/matrix-mx-puppet-groupme.service"
state: absent state: absent
when: "matrix_mx_puppet_groupme_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-groupme.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_groupme_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-instagram.service" path: "/etc/systemd/system/matrix-mx-puppet-instagram.service"
register: matrix_mx_puppet_instagram_service_stat register: matrix_mx_puppet_instagram_service_stat
- name: Ensure matrix-mx-puppet-instagram is stopped - when: matrix_mx_puppet_instagram_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-instagram - name: Ensure matrix-mx-puppet-instagram is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-instagram
daemon_reload: true state: stopped
when: "matrix_mx_puppet_instagram_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-instagram.service doesn't exist - name: Ensure matrix-mx-puppet-instagram.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-instagram.service" path: "/etc/systemd/system/matrix-mx-puppet-instagram.service"
state: absent state: absent
when: "matrix_mx_puppet_instagram_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-instagram.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_instagram_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-slack.service" path: "/etc/systemd/system/matrix-mx-puppet-slack.service"
register: matrix_mx_puppet_slack_service_stat register: matrix_mx_puppet_slack_service_stat
- name: Ensure matrix-mx-puppet-slack is stopped - when: matrix_mx_puppet_slack_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-slack - name: Ensure matrix-mx-puppet-slack is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-slack
daemon_reload: true state: stopped
when: "matrix_mx_puppet_slack_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-slack.service doesn't exist - name: Ensure matrix-mx-puppet-slack.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-slack.service" path: "/etc/systemd/system/matrix-mx-puppet-slack.service"
state: absent state: absent
when: "matrix_mx_puppet_slack_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-slack.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_slack_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-steam.service" path: "/etc/systemd/system/matrix-mx-puppet-steam.service"
register: matrix_mx_puppet_steam_service_stat register: matrix_mx_puppet_steam_service_stat
- name: Ensure matrix-mx-puppet-steam is stopped - when: matrix_mx_puppet_steam_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-steam - name: Ensure matrix-mx-puppet-steam is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-steam
daemon_reload: true state: stopped
when: "matrix_mx_puppet_steam_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-steam.service doesn't exist - name: Ensure matrix-mx-puppet-steam.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-steam.service" path: "/etc/systemd/system/matrix-mx-puppet-steam.service"
state: absent state: absent
when: "matrix_mx_puppet_steam_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-steam.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_steam_service_stat.stat.exists"

@ -5,21 +5,16 @@
path: "/etc/systemd/system/matrix-mx-puppet-twitter.service" path: "/etc/systemd/system/matrix-mx-puppet-twitter.service"
register: matrix_mx_puppet_twitter_service_stat register: matrix_mx_puppet_twitter_service_stat
- name: Ensure matrix-mx-puppet-twitter is stopped - when: matrix_mx_puppet_twitter_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-mx-puppet-twitter - name: Ensure matrix-mx-puppet-twitter is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-mx-puppet-twitter
daemon_reload: true state: stopped
when: "matrix_mx_puppet_twitter_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-mx-puppet-twitter.service doesn't exist - name: Ensure matrix-mx-puppet-twitter.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "/etc/systemd/system/matrix-mx-puppet-twitter.service" path: "/etc/systemd/system/matrix-mx-puppet-twitter.service"
state: absent state: absent
when: "matrix_mx_puppet_twitter_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-mx-puppet-twitter.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_twitter_service_stat.stat.exists"

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service"
register: matrix_cactus_comments_service_stat register: matrix_cactus_comments_service_stat
- name: Ensure cactus comments is stopped - when: matrix_cactus_comments_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-cactus-comments - name: Ensure cactus comments is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-cactus-comments
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_cactus_comments_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-cactus-comments.service doesn't exist - name: Ensure matrix-cactus-comments.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service"
state: absent state: absent
when: "matrix_cactus_comments_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-cactus-comments.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_cactus_comments_service_stat.stat.exists | bool"
- name: Ensure Matrix cactus comments paths don't exist
ansible.builtin.file:
path: "{{ matrix_cactus_comments_base_path }}"
state: absent
- name: Ensure cactus comments Docker image doesn't exist - name: Ensure Matrix cactus comments paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_cactus_comments_docker_image }}" path: "{{ matrix_cactus_comments_base_path }}"
state: absent state: absent

@ -4,32 +4,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service"
register: matrix_client_cinny_service_stat register: matrix_client_cinny_service_stat
- name: Ensure matrix-client-cinny is stopped - when: matrix_client_cinny_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-client-cinny - name: Ensure matrix-client-cinny is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-client-cinny
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_client_cinny_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-client-cinny.service doesn't exist - name: Ensure matrix-client-cinny.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service"
state: absent state: absent
when: "matrix_client_cinny_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-client-cinny.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_cinny_service_stat.stat.exists | bool"
- name: Ensure Cinny paths doesn't exist
ansible.builtin.file:
path: "{{ matrix_client_cinny_data_path }}"
state: absent
- name: Ensure Cinny Docker image doesn't exist - name: Ensure Cinny paths doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_client_cinny_docker_image }}" path: "{{ matrix_client_cinny_data_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service"
register: matrix_client_element_service_stat register: matrix_client_element_service_stat
- name: Ensure matrix-client-element is stopped - when: matrix_client_element_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-client-element - name: Ensure matrix-client-element is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-client-element
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_client_element_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-client-element.service doesn't exist - name: Ensure matrix-client-element.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service"
state: absent state: absent
when: "matrix_client_element_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-client-element.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_element_service_stat.stat.exists | bool"
- name: Ensure Element paths doesn't exist
ansible.builtin.file:
path: "{{ matrix_client_element_data_path }}"
state: absent
- name: Ensure Element Docker image doesn't exist - name: Ensure Element paths doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_client_element_docker_image }}" path: "{{ matrix_client_element_data_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service"
register: matrix_client_hydrogen_service_stat register: matrix_client_hydrogen_service_stat
- name: Ensure matrix-client-hydrogen is stopped - when: matrix_client_hydrogen_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-client-hydrogen - name: Ensure matrix-client-hydrogen is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-client-hydrogen
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_client_hydrogen_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-client-hydrogen.service doesn't exist - name: Ensure matrix-client-hydrogen.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service"
state: absent state: absent
when: "matrix_client_hydrogen_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-client-hydrogen.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_hydrogen_service_stat.stat.exists | bool"
- name: Ensure Hydrogen paths doesn't exist
ansible.builtin.file:
path: "{{ matrix_client_hydrogen_data_path }}"
state: absent
- name: Ensure Hydrogen Docker image doesn't exist - name: Ensure Hydrogen paths doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_client_hydrogen_docker_image }}" path: "{{ matrix_client_hydrogen_data_path }}"
state: absent state: absent

@ -5,26 +5,15 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service"
register: matrix_conduit_service_stat register: matrix_conduit_service_stat
- name: Ensure matrix-conduit is stopped - when: matrix_conduit_service_stat.stat.exists | bool
ansible.builtin.systemd: block:
name: matrix-conduit - name: Ensure matrix-conduit is stopped
state: stopped ansible.builtin.systemd:
daemon_reload: true name: matrix-conduit
register: stopping_result state: stopped
when: "matrix_conduit_service_stat.stat.exists" daemon_reload: true
- name: Ensure matrix-conduit.service doesn't exist - name: Ensure matrix-conduit.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service"
state: absent state: absent
when: "matrix_conduit_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-conduit.service removal
ansible.builtin.systemd:
daemon_reload: true
when: "matrix_conduit_service_stat.stat.exists"
- name: Ensure Conduit Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_conduit_docker_image }}"
state: absent

@ -13,26 +13,16 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-corporal.service doesn't exist - name: Ensure matrix-corporal.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-corporal.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-corporal.service"
state: absent state: absent
- name: Ensure systemd reloaded after matrix-corporal.service removal - name: Ensure matrix-corporal files don't exist
ansible.builtin.service: ansible.builtin.file:
daemon_reload: true path: "{{ item }}"
state: absent
- name: Ensure matrix-corporal files don't exist with_items:
ansible.builtin.file: - "{{ devture_systemd_docker_base_systemd_path }}/matrix-corporal.service"
path: "{{ item }}" - "{{ matrix_corporal_config_dir_path }}/config.json"
state: absent
with_items:
- "{{ devture_systemd_docker_base_systemd_path }}/matrix-corporal.service"
- "{{ matrix_corporal_config_dir_path }}/config.json"
- name: Ensure Matrix Corporal Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_corporal_docker_image }}"
state: absent

@ -6,42 +6,33 @@
register: matrix_coturn_service_stat register: matrix_coturn_service_stat
when: "not matrix_coturn_enabled | bool" when: "not matrix_coturn_enabled | bool"
- name: Ensure matrix-coturn is stopped - when: matrix_coturn_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-coturn - name: Ensure matrix-coturn is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-coturn
daemon_reload: true state: stopped
when: "matrix_coturn_service_stat.stat.exists | bool" enabled: false
daemon_reload: true
- name: Ensure matrix-coturn-reload.timer is stopped - name: Ensure matrix-coturn-reload.timer is stopped
ansible.builtin.service: ansible.builtin.service:
name: matrix-coturn name: matrix-coturn
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
failed_when: false failed_when: false
when: "matrix_coturn_service_stat.stat.exists | bool"
- name: Ensure systemd units don't exist - name: Ensure systemd units don't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ item }}" path: "{{ devture_systemd_docker_base_systemd_path }}/{{ item }}"
state: absent state: absent
register: matrix_coturn_systemd_unit_uninstallation_result with_items:
with_items: - matrix-coturn.service
- matrix-coturn.service - matrix-coturn-reload.service
- matrix-coturn-reload.service - matrix-coturn-reload.timer
- matrix-coturn-reload.timer
- name: Ensure systemd reloaded after unit removal - name: Ensure Matrix coturn paths don't exist
ansible.builtin.service: ansible.builtin.file:
daemon_reload: true path: "{{ matrix_coturn_base_path }}"
when: "matrix_coturn_systemd_unit_uninstallation_result.changed | bool" state: absent
- name: Ensure Matrix coturn paths don't exist
ansible.builtin.file:
path: "{{ matrix_coturn_base_path }}"
state: absent
# Intentionally not removing the Docker image when uninstalling.
# We can't be sure it had been pulled by us in the first place.

@ -12,14 +12,8 @@
name: matrix-dendrite name: matrix-dendrite
state: stopped state: stopped
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-dendrite.service doesn't exist - name: Ensure matrix-dendrite.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service"
state: absent state: absent
- name: Ensure Dendrite Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_dendrite_docker_image }}"
state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service"
register: matrix_dimension_service_stat register: matrix_dimension_service_stat
- name: Ensure matrix-dimension is stopped - when: matrix_dimension_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-dimension - name: Ensure matrix-dimension is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-dimension
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_dimension_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-dimension.service doesn't exist - name: Ensure matrix-dimension.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service"
state: absent state: absent
when: "matrix_dimension_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-dimension.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_dimension_service_stat.stat.exists | bool"
- name: Ensure Dimension base directory doesn't exist
ansible.builtin.file:
path: "{{ matrix_dimension_base_path }}"
state: absent
- name: Ensure Dimension Docker image doesn't exist - name: Ensure Dimension base directory doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_dimension_docker_image }}" path: "{{ matrix_dimension_base_path }}"
state: absent state: absent

@ -5,24 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service"
register: matrix_dynamic_dns_service_stat register: matrix_dynamic_dns_service_stat
- name: Ensure matrix-dynamic-dns is stopped - when: matrix_dynamic_dns_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-dynamic-dns - name: Ensure matrix-dynamic-dns is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-dynamic-dns
daemon_reload: true state: stopped
when: "matrix_dynamic_dns_service_stat.stat.exists" enabled: false
daemon_reload: true
- name: Ensure matrix-dynamic-dns.service doesn't exist - name: Ensure matrix-dynamic-dns.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service"
state: absent state: absent
when: "matrix_dynamic_dns_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-dynamic-dns.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_dynamic_dns_service_stat.stat.exists"
# Intentionally not removing the Docker image when uninstalling.
# We can't be sure it had been pulled by us in the first place.

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service"
register: matrix_email2matrix_service_stat register: matrix_email2matrix_service_stat
- name: Ensure matrix-email2matrix is stopped - when: matrix_email2matrix_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-email2matrix - name: Ensure matrix-email2matrix is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-email2matrix
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_email2matrix_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-email2matrix.service doesn't exist - name: Ensure matrix-email2matrix.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service"
state: absent state: absent
when: "matrix_email2matrix_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-email2matrix.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_email2matrix_service_stat.stat.exists | bool"
- name: Ensure Email2Matrix data path doesn't exist
ansible.builtin.file:
path: "{{ matrix_email2matrix_base_path }}"
state: absent
- name: Ensure Email2Matrix Docker image doesn't exist - name: Ensure Email2Matrix data path doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_email2matrix_docker_image }}" path: "{{ matrix_email2matrix_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service"
register: matrix_etherpad_service_stat register: matrix_etherpad_service_stat
- name: Ensure matrix-etherpad is stopped - when: matrix_etherpad_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-etherpad - name: Ensure matrix-etherpad is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-etherpad
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_etherpad_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-etherpad.service doesn't exist - name: Ensure matrix-etherpad.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service"
state: absent state: absent
when: "matrix_etherpad_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-etherpad.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_etherpad_service_stat.stat.exists | bool"
- name: Ensure Etherpad base directory doesn't exist
ansible.builtin.file:
path: "{{ matrix_etherpad_base_path }}"
state: absent
- name: Ensure Etherpad Docker image doesn't exist - name: Ensure Etherpad base directory doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_etherpad_docker_image }}" path: "{{ matrix_etherpad_base_path }}"
state: absent state: absent

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-grafana.service doesn't exist - name: Ensure matrix-grafana.service doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-jitsi-jicofo.service doesn't exist - name: Ensure matrix-jitsi-jicofo.service doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-jitsi-jvb.service doesn't exist - name: Ensure matrix-jitsi-jvb.service doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-jitsi-prosody.service file doesn't exist - name: Ensure matrix-jitsi-prosody.service file doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-jitsi-web.service doesn't exist - name: Ensure matrix-jitsi-web.service doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service"
register: matrix_ldap_registration_proxy_service_stat register: matrix_ldap_registration_proxy_service_stat
- name: Ensure matrix-matrix_ldap_registration_proxy is stopped - when: matrix_ldap_registration_proxy_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-matrix_ldap_registration_proxy - name: Ensure matrix-matrix_ldap_registration_proxy is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-matrix_ldap_registration_proxy
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_ldap_registration_proxy_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-ldap-registration-proxy.service doesn't exist - name: Ensure matrix-ldap-registration-proxy.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service"
state: absent state: absent
when: "matrix_ldap_registration_proxy_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-ldap-registration-proxy.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_ldap_registration_proxy_service_stat.stat.exists | bool"
- name: Ensure Matrix matrix_ldap_registration_proxy paths don't exist
ansible.builtin.file:
path: "{{ matrix_ldap_registration_proxy_base_path }}"
state: absent
- name: Ensure matrix_ldap_registration_proxy Docker image doesn't exist - name: Ensure Matrix matrix_ldap_registration_proxy paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_ldap_registration_proxy_docker_image }}" path: "{{ matrix_ldap_registration_proxy_base_path }}"
state: absent state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service"
register: matrix_ma1sd_service_stat register: matrix_ma1sd_service_stat
- name: Ensure matrix-ma1sd is stopped - when: matrix_ma1sd_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-ma1sd - name: Ensure matrix-ma1sd is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-ma1sd
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_ma1sd_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-ma1sd.service doesn't exist - name: Ensure matrix-ma1sd.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service"
state: absent state: absent
when: "matrix_ma1sd_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-ma1sd.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_ma1sd_service_stat.stat.exists | bool"
- name: Ensure Matrix ma1sd paths don't exist
ansible.builtin.file:
path: "{{ matrix_ma1sd_base_path }}"
state: absent
- name: Ensure ma1sd Docker image doesn't exist - name: Ensure Matrix ma1sd paths don't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_ma1sd_docker_image }}" path: "{{ matrix_ma1sd_base_path }}"
state: absent state: absent

@ -13,23 +13,13 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-mailer.service doesn't exist - name: Ensure matrix-mailer.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mailer.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mailer.service"
state: absent state: absent
- name: Ensure systemd reloaded after matrix-mailer.service removal - name: Ensure Matrix mailer path doesn't exist
ansible.builtin.service: ansible.builtin.file:
daemon_reload: true path: "{{ matrix_mailer_base_path }}"
state: absent
- name: Ensure Matrix mailer path doesn't exist
ansible.builtin.file:
path: "{{ matrix_mailer_base_path }}"
state: absent
- name: Ensure mailer Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_mailer_docker_image }}"
state: absent

@ -239,7 +239,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
when: "not matrix_nginx_proxy_enabled | bool and matrix_nginx_proxy_service_stat.stat.exists" when: "not matrix_nginx_proxy_enabled | bool and matrix_nginx_proxy_service_stat.stat.exists"
- name: Ensure matrix-nginx-proxy.service doesn't exist - name: Ensure matrix-nginx-proxy.service doesn't exist

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service"
register: matrix_ntfy_service_stat register: matrix_ntfy_service_stat
- name: Ensure matrix-ntfy is stopped - when: matrix_ntfy_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-ntfy - name: Ensure matrix-ntfy is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-ntfy
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_ntfy_service_stat.stat.exists" daemon_reload: true
- name: Ensure matrix-ntfy.service doesn't exist - name: Ensure matrix-ntfy.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service"
state: absent state: absent
when: "matrix_ntfy_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-ntfy.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_ntfy_service_stat.stat.exists"
- name: Ensure matrix-ntfy path doesn't exist
ansible.builtin.file:
path: "{{ matrix_ntfy_base_path }}"
state: absent
- name: Ensure ntfy Docker image doesn't exist - name: Ensure matrix-ntfy path doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_ntfy_docker_image }}" path: "{{ matrix_ntfy_base_path }}"
state: absent state: absent

@ -20,10 +20,6 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service"
state: absent state: absent
- name: Ensure systemd reloaded after matrix-postgres-backup.service removal
ansible.builtin.service:
daemon_reload: true
- name: Check existence of matrix-postgres-backup backup path - name: Check existence of matrix-postgres-backup backup path
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ matrix_postgres_backup_path }}" path: "{{ matrix_postgres_backup_path }}"

@ -13,13 +13,8 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-prometheus-node-exporter.service doesn't exist - name: Ensure matrix-prometheus-node-exporter.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus-node-exporter.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus-node-exporter.service"
state: absent state: absent
- name: Ensure systemd reloaded after matrix-prometheus-node-exporter.service removal
ansible.builtin.service:
daemon_reload: true

@ -13,7 +13,6 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-prometheus-postgres-exporter.service doesn't exist - name: Ensure matrix-prometheus-postgres-exporter.service doesn't exist
ansible.builtin.file: ansible.builtin.file:

@ -5,22 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service"
register: matrix_prometheus_service_stat register: matrix_prometheus_service_stat
- name: Ensure matrix-prometheus is stopped - when: matrix_prometheus_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-prometheus - name: Ensure matrix-prometheus is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-prometheus
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_prometheus_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-prometheus.service doesn't exist - name: Ensure matrix-prometheus.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service"
state: absent state: absent
when: "matrix_prometheus_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-prometheus.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_prometheus_service_stat.stat.exists | bool"

@ -5,27 +5,16 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service"
register: matrix_registration_service_stat register: matrix_registration_service_stat
- name: Ensure matrix-registration is stopped - when: matrix_registration_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-registration - name: Ensure matrix-registration is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-registration
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_registration_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-registration.service doesn't exist - name: Ensure matrix-registration.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service"
state: absent state: absent
when: "matrix_registration_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-registration.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_registration_service_stat.stat.exists | bool"
- name: Ensure matrix-registration Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_registration_docker_image }}"
state: absent

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service"
register: matrix_sygnal_service_stat register: matrix_sygnal_service_stat
- name: Ensure matrix-sygnal is stopped - when: matrix_sygnal_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-sygnal - name: Ensure matrix-sygnal is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-sygnal
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_sygnal_service_stat.stat.exists | bool" daemon_reload: true
- name: Ensure matrix-sygnal.service doesn't exist - name: Ensure matrix-sygnal.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service"
state: absent state: absent
when: "matrix_sygnal_service_stat.stat.exists | bool"
- name: Ensure systemd reloaded after matrix-sygnal.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_sygnal_service_stat.stat.exists | bool"
- name: Ensure Sygnal base directory doesn't exist
ansible.builtin.file:
path: "{{ matrix_sygnal_base_path }}"
state: absent
- name: Ensure Sygnal Docker image doesn't exist - name: Ensure Sygnal base directory doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_sygnal_docker_image }}" path: "{{ matrix_sygnal_base_path }}"
state: absent state: absent

@ -13,15 +13,8 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-synapse-admin.service doesn't exist - name: Ensure matrix-synapse-admin.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-admin.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-admin.service"
state: absent state: absent
- name: Ensure matrix-synapse-admin Docker image doesn't exist
community.docker.docker_image:
name: "{{ matrix_synapse_admin_docker_image }}"
state: absent
when: "not matrix_synapse_admin_enabled | bool"

@ -13,18 +13,13 @@
state: stopped state: stopped
enabled: false enabled: false
daemon_reload: true daemon_reload: true
register: stopping_result
- name: Ensure matrix-synapse-reverse-proxy-companion.service doesn't exist - name: Ensure matrix-synapse-reverse-proxy-companion.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-reverse-proxy-companion.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse-reverse-proxy-companion.service"
state: absent state: absent
- name: Ensure systemd reloaded after matrix-synapse-reverse-proxy-companion.service removal - name: Ensure matrix-synapse-reverse-proxy-companion data deleted
ansible.builtin.service: ansible.builtin.file:
daemon_reload: true path: "{{ matrix_synapse_reverse_proxy_companion_base_path }}"
state: absent
- name: Ensure matrix-synapse-reverse-proxy-companion data deleted
ansible.builtin.file:
path: "{{ matrix_synapse_reverse_proxy_companion_base_path }}"
state: absent

@ -9,11 +9,6 @@
- matrix-synapse-s3-storage-provider-migrate.service - matrix-synapse-s3-storage-provider-migrate.service
register: matrix_synapse_s3_storage_provider_migrate_sevice_removal register: matrix_synapse_s3_storage_provider_migrate_sevice_removal
- name: Ensure systemd reloaded after matrix-synapse-s3-storage-provider-migrate.service removal
ansible.builtin.service:
daemon_reload: true
when: matrix_synapse_s3_storage_provider_migrate_sevice_removal.changed | bool
- name: Ensure s3-storage-provider files don't exist - name: Ensure s3-storage-provider files don't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"

@ -5,32 +5,21 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service"
register: matrix_goofys_service_stat register: matrix_goofys_service_stat
- name: Ensure matrix-goofys is stopped - when: matrix_goofys_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-goofys - name: Ensure matrix-goofys is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-goofys
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_goofys_service_stat.stat.exists" daemon_reload: true
- name: Ensure matrix-goofys.service doesn't exist - name: Ensure matrix-goofys.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service"
state: absent state: absent
when: "matrix_goofys_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-goofys.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_goofys_service_stat.stat.exists"
- name: Ensure goofys environment variables file doesn't exist
ansible.builtin.file:
path: "{{ matrix_synapse_config_dir_path }}/env-goofys"
state: absent
- name: Ensure Goofys Docker image doesn't exist - name: Ensure goofys environment variables file doesn't exist
community.docker.docker_image: ansible.builtin.file:
name: "{{ matrix_s3_goofys_docker_image }}" path: "{{ matrix_synapse_config_dir_path }}/env-goofys"
state: absent state: absent

@ -5,36 +5,22 @@
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service"
register: matrix_synapse_service_stat register: matrix_synapse_service_stat
- name: Ensure matrix-synapse is stopped - when: matrix_synapse_service_stat.stat.exists | bool
ansible.builtin.service: block:
name: matrix-synapse - name: Ensure matrix-synapse is stopped
state: stopped ansible.builtin.service:
enabled: false name: matrix-synapse
daemon_reload: true state: stopped
register: stopping_result enabled: false
when: "matrix_synapse_service_stat.stat.exists" daemon_reload: true
- name: Ensure matrix-synapse.service doesn't exist - name: Ensure matrix-synapse.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service"
state: absent state: absent
when: "matrix_synapse_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-synapse.service removal
ansible.builtin.service:
daemon_reload: true
when: "matrix_synapse_service_stat.stat.exists"
- name: Ensure Synapse Docker image doesn't exist
community.docker.docker_image:
name: "{{ item }}"
state: absent
with_items:
- "{{ matrix_synapse_docker_image_final }}"
- "{{ matrix_synapse_docker_image }}"
- name: Ensure sample prometheus.yml for external scraping is deleted - name: Ensure sample prometheus.yml for external scraping is deleted
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_synapse_base_path }}/external_prometheus.yml.example" path: "{{ matrix_synapse_base_path }}/external_prometheus.yml.example"
state: absent state: absent
when: "not matrix_synapse_metrics_proxying_enabled | bool" when: "not matrix_synapse_metrics_proxying_enabled | bool"

Loading…
Cancel
Save