Optimize initial installation by not reloading systemd after each .service install

We expect `--tags=start` to handle systemd reloading, so we don't need
to do it manually each time we install/uninstall a .service file.
development
Slavi Pantaleev 2 years ago
parent 707e909b9b
commit 2688e8bfc3

@ -89,15 +89,10 @@
src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2" src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
mode: 0644 mode: 0644
register: matrix_bot_buscarron_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-buscarron.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_buscarron_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-buscarron.service restarted, if necessary - name: Ensure matrix-bot-buscarron.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-bot-buscarron.service" name: "matrix-bot-buscarron.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_bot_buscarron_requires_restart | bool" when: "matrix_bot_buscarron_requires_restart | bool"

@ -42,13 +42,9 @@
mode: 0644 mode: 0644
register: matrix_bot_go_neb_systemd_service_result register: matrix_bot_go_neb_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-go-neb.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_go_neb_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-go-neb.service restarted, if necessary - name: Ensure matrix-bot-go-neb.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-bot-go-neb.service" name: "matrix-bot-go-neb.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_bot_go_neb_requires_restart | bool" when: "matrix_bot_go_neb_requires_restart | bool"

@ -91,13 +91,9 @@
mode: 0644 mode: 0644
register: matrix_bot_honoroit_systemd_service_result register: matrix_bot_honoroit_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-honoroit.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_honoroit_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-honoroit.service restarted, if necessary - name: Ensure matrix-bot-honoroit.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-bot-honoroit.service" name: "matrix-bot-honoroit.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_bot_honoroit_requires_restart | bool" when: "matrix_bot_honoroit_requires_restart | bool"

@ -61,14 +61,3 @@
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2" src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service"
mode: 0644 mode: 0644
register: matrix_bot_matrix_registration_bot_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-matrix-registration-bot.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_matrix_registration_bot_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-matrix-registration-bot.service restarted, if necessary
ansible.builtin.service:
name: "matrix-bot-matrix-registration-bot.service"
state: restarted

@ -92,13 +92,9 @@
mode: 0644 mode: 0644
register: matrix_bot_matrix_reminder_bot_systemd_service_result register: matrix_bot_matrix_reminder_bot_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-matrix-reminder-bot.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_matrix_reminder_bot_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-matrix-reminder-bot.service restarted, if necessary - name: Ensure matrix-bot-matrix-reminder-bot.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-bot-matrix-reminder-bot.service" name: "matrix-bot-matrix-reminder-bot.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_bot_matrix_reminder_bot_requires_restart | bool" when: "matrix_bot_matrix_reminder_bot_requires_restart | bool"

@ -65,9 +65,3 @@
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2" src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
mode: 0644 mode: 0644
register: matrix_bot_maubot_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-maubot.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_maubot_systemd_service_result.changed|bool"

@ -66,13 +66,9 @@
mode: 0644 mode: 0644
register: matrix_bot_mjolnir_systemd_service_result register: matrix_bot_mjolnir_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-mjolnir.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_mjolnir_systemd_service_result.changed | bool"
- name: Ensure matrix-bot-mjolnir.service restarted, if necessary - name: Ensure matrix-bot-mjolnir.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-bot-mjolnir.service" name: "matrix-bot-mjolnir.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_bot_mjolnir_requires_restart | bool" when: "matrix_bot_mjolnir_requires_restart | bool"

@ -86,8 +86,3 @@
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
mode: 0644 mode: 0644
register: matrix_bot_postmoogle_systemd_service_result register: matrix_bot_postmoogle_systemd_service_result
- name: Ensure systemd reloaded after matrix-bot-postmoogle.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_bot_postmoogle_systemd_service_result.changed | bool"

@ -109,13 +109,9 @@
mode: 0644 mode: 0644
register: matrix_appservice_discord_systemd_service_result register: matrix_appservice_discord_systemd_service_result
- name: Ensure systemd reloaded after matrix-appservice-discord.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_discord_systemd_service_result.changed"
- name: Ensure matrix-appservice-discord.service restarted, if necessary - name: Ensure matrix-appservice-discord.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-appservice-discord.service" name: "matrix-appservice-discord.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_appservice_discord_requires_restart | bool" when: "matrix_appservice_discord_requires_restart | bool"

@ -199,13 +199,9 @@
mode: 0644 mode: 0644
register: matrix_appservice_irc_systemd_service_result register: matrix_appservice_irc_systemd_service_result
- name: Ensure systemd reloaded after matrix-appservice-irc.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_irc_systemd_service_result.changed"
- name: Ensure matrix-appservice-irc.service restarted, if necessary - name: Ensure matrix-appservice-irc.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-appservice-irc.service" name: "matrix-appservice-irc.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_appservice_irc_requires_restart | bool" when: "matrix_appservice_irc_requires_restart | bool"

@ -109,9 +109,3 @@
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2" src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service"
mode: 0644 mode: 0644
register: matrix_appservice_kakaotalk_systemd_service_result
- name: Ensure systemd reloaded after matrix-appservice-kakaotalk.service or matrix-appservice-kakaotalk-node.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_appservice_kakaotalk_node_systemd_service_result.changed or matrix_appservice_kakaotalk_systemd_service_result.changed

@ -87,15 +87,10 @@
src: "{{ role_path }}/templates/systemd/matrix-appservice-slack.service.j2" src: "{{ role_path }}/templates/systemd/matrix-appservice-slack.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service"
mode: 0644 mode: 0644
register: matrix_appservice_slack_systemd_service_result
- name: Ensure systemd reloaded after matrix-appservice-slack.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_slack_systemd_service_result.changed"
- name: Ensure matrix-appservice-slack.service restarted, if necessary - name: Ensure matrix-appservice-slack.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-appservice-slack.service" name: "matrix-appservice-slack.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_appservice_slack_requires_restart | bool" when: "matrix_appservice_slack_requires_restart | bool"

@ -86,9 +86,3 @@
src: "{{ role_path }}/templates/systemd/matrix-appservice-webhooks.service.j2" src: "{{ role_path }}/templates/systemd/matrix-appservice-webhooks.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service"
mode: 0644 mode: 0644
register: matrix_appservice_webhooks_systemd_service_result
- name: Ensure systemd reloaded after matrix-appservice-webhooks.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_appservice_webhooks_systemd_service_result.changed"

@ -88,9 +88,3 @@
src: "{{ role_path }}/templates/systemd/matrix-beeper-linkedin.service.j2" src: "{{ role_path }}/templates/systemd/matrix-beeper-linkedin.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service"
mode: 0644 mode: 0644
register: matrix_beeper_linkedin_systemd_service_result
- name: Ensure systemd reloaded after matrix-beeper-linkedin.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_beeper_linkedin_systemd_service_result.changed"

@ -128,13 +128,9 @@
mode: 0644 mode: 0644
register: matrix_go_skype_bridge_systemd_service_result register: matrix_go_skype_bridge_systemd_service_result
- name: Ensure systemd reloaded after matrix-go-skype-bridge.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_go_skype_bridge_systemd_service_result.changed"
- name: Ensure matrix-go-skype-bridge.service restarted, if necessary - name: Ensure matrix-go-skype-bridge.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-go-skype-bridge.service" name: "matrix-go-skype-bridge.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_go_skype_bridge_requires_restart | bool" when: "matrix_go_skype_bridge_requires_restart | bool"

@ -34,9 +34,3 @@
src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2" src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
mode: 0644 mode: 0644
register: matrix_heisenbridge_systemd_service_result
- name: Ensure systemd reloaded after matrix-heisenbridge.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_heisenbridge_systemd_service_result.changed

@ -110,9 +110,3 @@
src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2" src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service"
mode: 0644 mode: 0644
register: matrix_hookshot_systemd_service_result
- name: Ensure systemd reloaded after matrix-hookshot.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_hookshot_systemd_service_result.changed

@ -101,13 +101,9 @@
mode: 0644 mode: 0644
register: matrix_mautrix_discord_systemd_service_result register: matrix_mautrix_discord_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-discord.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_discord_systemd_service_result.changed"
- name: Ensure matrix-mautrix-discord.service restarted, if necessary - name: Ensure matrix-mautrix-discord.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-discord.service" name: "matrix-mautrix-discord.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_discord_requires_restart | bool" when: "matrix_mautrix_discord_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-facebook.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-facebook.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service"
mode: 0644 mode: 0644
register: matrix_mautrix_facebook_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-facebook.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_facebook_systemd_service_result.changed"
- name: Ensure matrix-mautrix-facebook.service restarted, if necessary - name: Ensure matrix-mautrix-facebook.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-facebook.service" name: "matrix-mautrix-facebook.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_facebook_requires_restart | bool" when: "matrix_mautrix_facebook_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-googlechat.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-googlechat.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service"
mode: 0644 mode: 0644
register: matrix_mautrix_googlechat_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-googlechat.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_googlechat_systemd_service_result.changed"
- name: Ensure matrix-mautrix-googlechat.service restarted, if necessary - name: Ensure matrix-mautrix-googlechat.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-googlechat.service" name: "matrix-mautrix-googlechat.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_googlechat_requires_restart | bool" when: "matrix_mautrix_googlechat_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-hangouts.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-hangouts.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service"
mode: 0644 mode: 0644
register: matrix_mautrix_hangouts_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-hangouts.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_hangouts_systemd_service_result.changed"
- name: Ensure matrix-mautrix-hangouts.service restarted, if necessary - name: Ensure matrix-mautrix-hangouts.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-hangouts.service" name: "matrix-mautrix-hangouts.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_hangouts_requires_restart | bool" when: "matrix_mautrix_hangouts_requires_restart | bool"

@ -70,9 +70,3 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-instagram.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-instagram.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service"
mode: 0644 mode: 0644
register: matrix_mautrix_instagram_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-instagram.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_instagram_systemd_service_result.changed"

@ -121,9 +121,3 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service"
mode: 0644 mode: 0644
register: matrix_mautrix_signal_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-signal.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_signal_systemd_service_result.changed or matrix_mautrix_signal_daemon_systemd_service_result.changed"

@ -141,15 +141,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
mode: 0644 mode: 0644
register: matrix_mautrix_telegram_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-telegram.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_telegram_systemd_service_result.changed"
- name: Ensure matrix-mautrix-telegram.service restarted, if necessary - name: Ensure matrix-mautrix-telegram.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-telegram.service" name: "matrix-mautrix-telegram.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_telegram_requires_restart | bool" when: "matrix_mautrix_telegram_requires_restart | bool"

@ -72,15 +72,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-twitter.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-twitter.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
mode: 0644 mode: 0644
register: matrix_mautrix_twitter_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-twitter.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_twitter_systemd_service_result.changed"
- name: Ensure matrix-mautrix-twitter.service restarted, if necessary - name: Ensure matrix-mautrix-twitter.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-twitter.service" name: "matrix-mautrix-twitter.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_twitter_requires_restart | bool" when: "matrix_mautrix_twitter_requires_restart | bool"

@ -126,15 +126,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mautrix-whatsapp.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-whatsapp.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
mode: 0644 mode: 0644
register: matrix_mautrix_whatsapp_systemd_service_result
- name: Ensure systemd reloaded after matrix-mautrix-whatsapp.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mautrix_whatsapp_systemd_service_result.changed"
- name: Ensure matrix-mautrix-whatsapp.service restarted, if necessary - name: Ensure matrix-mautrix-whatsapp.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mautrix-whatsapp.service" name: "matrix-mautrix-whatsapp.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mautrix_whatsapp_requires_restart | bool" when: "matrix_mautrix_whatsapp_requires_restart | bool"

@ -118,15 +118,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-discord.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-discord.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-discord.service" dest: "/etc/systemd/system/matrix-mx-puppet-discord.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_discord_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-discord.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_discord_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-discord.service restarted, if necessary - name: Ensure matrix-mx-puppet-discord.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-discord.service" name: "matrix-mx-puppet-discord.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_discord_requires_restart | bool" when: "matrix_mx_puppet_discord_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-groupme.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-groupme.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-groupme.service" dest: "/etc/systemd/system/matrix-mx-puppet-groupme.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_groupme_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-groupme.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_groupme_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-groupme.service restarted, if necessary - name: Ensure matrix-mx-puppet-groupme.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-groupme.service" name: "matrix-mx-puppet-groupme.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_groupme_requires_restart | bool" when: "matrix_mx_puppet_groupme_requires_restart | bool"

@ -98,15 +98,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-instagram.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-instagram.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-instagram.service" dest: "/etc/systemd/system/matrix-mx-puppet-instagram.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_instagram_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-instagram.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_instagram_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-instagram.service restarted, if necessary - name: Ensure matrix-mx-puppet-instagram.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-instagram.service" name: "matrix-mx-puppet-instagram.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_instagram_requires_restart | bool" when: "matrix_mx_puppet_instagram_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-slack.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-slack.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-slack.service" dest: "/etc/systemd/system/matrix-mx-puppet-slack.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_slack_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-slack.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_slack_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-slack.service restarted, if necessary - name: Ensure matrix-mx-puppet-slack.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-slack.service" name: "matrix-mx-puppet-slack.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_slack_requires_restart | bool" when: "matrix_mx_puppet_slack_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-steam.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-steam.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-steam.service" dest: "/etc/systemd/system/matrix-mx-puppet-steam.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_steam_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-steam.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_steam_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-steam.service restarted, if necessary - name: Ensure matrix-mx-puppet-steam.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-steam.service" name: "matrix-mx-puppet-steam.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_steam_requires_restart | bool" when: "matrix_mx_puppet_steam_requires_restart | bool"

@ -116,15 +116,10 @@
src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-twitter.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mx-puppet-twitter.service.j2"
dest: "/etc/systemd/system/matrix-mx-puppet-twitter.service" dest: "/etc/systemd/system/matrix-mx-puppet-twitter.service"
mode: 0644 mode: 0644
register: matrix_mx_puppet_twitter_systemd_service_result
- name: Ensure systemd reloaded after matrix-mx-puppet-twitter.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_mx_puppet_twitter_systemd_service_result.changed"
- name: Ensure matrix-mx-puppet-twitter.service restarted, if necessary - name: Ensure matrix-mx-puppet-twitter.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-mx-puppet-twitter.service" name: "matrix-mx-puppet-twitter.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_mx_puppet_twitter_requires_restart | bool" when: "matrix_mx_puppet_twitter_requires_restart | bool"

@ -51,9 +51,3 @@
src: "{{ role_path }}/templates/systemd/matrix-sms-bridge.service.j2" src: "{{ role_path }}/templates/systemd/matrix-sms-bridge.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sms-bridge.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sms-bridge.service"
mode: 0644 mode: 0644
register: matrix_sms_bridge_systemd_service_result
- name: Ensure systemd reloaded after matrix-sms-bridge.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_sms_bridge_systemd_service_result.changed

@ -125,14 +125,3 @@
src: "{{ role_path }}/templates/systemd/matrix-cactus-comments.service.j2" src: "{{ role_path }}/templates/systemd/matrix-cactus-comments.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-cactus-comments.service"
mode: 0644 mode: 0644
register: matrix_cactus_comments_systemd_service_result
- name: Ensure systemd reloaded after matrix-cactus-comments.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_cactus_comments_systemd_service_result.changed | bool"
- name: Ensure matrix-cactus-comments.service restarted, if necessary
ansible.builtin.service:
name: "matrix-cactus-comments.service"
state: restarted

@ -69,9 +69,3 @@
src: "{{ role_path }}/templates/systemd/matrix-client-cinny.service.j2" src: "{{ role_path }}/templates/systemd/matrix-client-cinny.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-cinny.service"
mode: 0644 mode: 0644
register: matrix_client_cinny_systemd_service_result
- name: Ensure systemd reloaded after matrix-client-cinny.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_cinny_systemd_service_result.changed | bool"

@ -104,9 +104,3 @@
src: "{{ role_path }}/templates/systemd/matrix-client-element.service.j2" src: "{{ role_path }}/templates/systemd/matrix-client-element.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-element.service"
mode: 0644 mode: 0644
register: matrix_client_element_systemd_service_result
- name: Ensure systemd reloaded after matrix-client-element.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_element_systemd_service_result.changed | bool"

@ -73,9 +73,3 @@
src: "{{ role_path }}/templates/systemd/matrix-client-hydrogen.service.j2" src: "{{ role_path }}/templates/systemd/matrix-client-hydrogen.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-client-hydrogen.service"
mode: 0644 mode: 0644
register: matrix_client_hydrogen_systemd_service_result
- name: Ensure systemd reloaded after matrix-client-hydrogen.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_client_hydrogen_systemd_service_result.changed | bool"

@ -39,9 +39,3 @@
src: "{{ role_path }}/templates/conduit/systemd/matrix-conduit.service.j2" src: "{{ role_path }}/templates/conduit/systemd/matrix-conduit.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service"
mode: 0644 mode: 0644
register: matrix_conduit_systemd_service_result
- name: Ensure systemd reloaded after matrix-conduit.service installation
ansible.builtin.systemd:
daemon_reload: true
when: "matrix_conduit_systemd_service_result.changed | bool"

@ -126,15 +126,10 @@
src: "{{ role_path }}/templates/systemd/matrix-dimension.service.j2" src: "{{ role_path }}/templates/systemd/matrix-dimension.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dimension.service"
mode: 0644 mode: 0644
register: matrix_dimension_systemd_service_result
- name: Ensure systemd reloaded after matrix-dimension.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_dimension_systemd_service_result.changed | bool"
- name: Ensure matrix-dimension.service restarted, if necessary - name: Ensure matrix-dimension.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-dimension.service" name: "matrix-dimension.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_dimension_requires_restart | bool" when: "matrix_dimension_requires_restart | bool"

@ -61,9 +61,3 @@
src: "{{ role_path }}/templates/systemd/matrix-dynamic-dns.service.j2" src: "{{ role_path }}/templates/systemd/matrix-dynamic-dns.service.j2"
dest: "/etc/systemd/system/matrix-dynamic-dns.service" dest: "/etc/systemd/system/matrix-dynamic-dns.service"
mode: 0644 mode: 0644
register: matrix_dynamic_dns_systemd_service_result
- name: Ensure systemd reloaded after matrix-dynamic-dns.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_dynamic_dns_systemd_service_result.changed"

@ -61,9 +61,3 @@
src: "{{ role_path }}/templates/systemd/matrix-email2matrix.service.j2" src: "{{ role_path }}/templates/systemd/matrix-email2matrix.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-email2matrix.service"
mode: 0644 mode: 0644
register: matrix_email2matrix_systemd_service_result
- name: Ensure systemd reloaded after matrix-email2matrix.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_email2matrix_systemd_service_result.changed | bool"

@ -32,9 +32,3 @@
src: "{{ role_path }}/templates/systemd/matrix-etherpad.service.j2" src: "{{ role_path }}/templates/systemd/matrix-etherpad.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-etherpad.service"
mode: 0644 mode: 0644
register: matrix_etherpad_systemd_service_result
- name: Ensure systemd reloaded after matrix-etherpad.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_etherpad_systemd_service_result.changed | bool"

@ -12,9 +12,6 @@
- {path: "{{ matrix_ldap_registration_proxy_docker_src_files_path }}", when: true} - {path: "{{ matrix_ldap_registration_proxy_docker_src_files_path }}", when: true}
when: "item.when | bool" when: "item.when | bool"
- ansible.builtin.set_fact:
matrix_ldap_registration_proxy_requires_restart: false
- name: Ensure matrix_ldap_registration_proxy repository is present on self-build - name: Ensure matrix_ldap_registration_proxy repository is present on self-build
ansible.builtin.git: ansible.builtin.git:
repo: "{{ matrix_ldap_registration_proxy_container_image_self_build_repo }}" repo: "{{ matrix_ldap_registration_proxy_container_image_self_build_repo }}"
@ -49,15 +46,3 @@
src: "{{ role_path }}/templates/systemd/matrix-ldap-registration-proxy.service.j2" src: "{{ role_path }}/templates/systemd/matrix-ldap-registration-proxy.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ldap-registration-proxy.service"
mode: 0644 mode: 0644
register: matrix_ldap_registration_proxy_systemd_service_result
- name: Ensure systemd reloaded after matrix-ldap-registration-proxy.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_ldap_registration_proxy_systemd_service_result.changed | bool"
- name: Ensure matrix-ldap-registration-proxy.service restarted, if necessary
ansible.builtin.service:
name: "matrix-ldap-registration-proxy.service"
state: restarted
when: "matrix_ldap_registration_proxy_requires_restart | bool"

@ -156,15 +156,10 @@
src: "{{ role_path }}/templates/systemd/matrix-ma1sd.service.j2" src: "{{ role_path }}/templates/systemd/matrix-ma1sd.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ma1sd.service"
mode: 0644 mode: 0644
register: matrix_ma1sd_systemd_service_result
- name: Ensure systemd reloaded after matrix-ma1sd.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_ma1sd_systemd_service_result.changed | bool"
- name: Ensure matrix-ma1sd.service restarted, if necessary - name: Ensure matrix-ma1sd.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-ma1sd.service" name: "matrix-ma1sd.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_ma1sd_requires_restart | bool" when: "matrix_ma1sd_requires_restart | bool"

@ -58,9 +58,3 @@
src: "{{ role_path }}/templates/systemd/matrix-mailer.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mailer.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mailer.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mailer.service"
mode: 0644 mode: 0644
register: matrix_mailer_systemd_service_result
- name: Ensure systemd reloaded after matrix-mailer.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_mailer_systemd_service_result.changed | bool

@ -214,14 +214,8 @@
src: "{{ role_path }}/templates/systemd/matrix-nginx-proxy.service.j2" src: "{{ role_path }}/templates/systemd/matrix-nginx-proxy.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-nginx-proxy.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-nginx-proxy.service"
mode: 0644 mode: 0644
register: matrix_nginx_proxy_systemd_service_result
when: matrix_nginx_proxy_enabled | bool when: matrix_nginx_proxy_enabled | bool
- name: Ensure systemd reloaded after matrix-nginx-proxy.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_nginx_proxy_enabled and matrix_nginx_proxy_systemd_service_result.changed"
# #
# Tasks related to getting rid of matrix-nginx-proxy (if it was previously enabled) # Tasks related to getting rid of matrix-nginx-proxy (if it was previously enabled)
@ -247,11 +241,6 @@
state: absent state: absent
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 systemd reloaded after matrix-nginx-proxy.service removal
ansible.builtin.service:
daemon_reload: true
when: "not matrix_nginx_proxy_enabled | bool and matrix_nginx_proxy_service_stat.stat.exists"
- name: Ensure Matrix nginx-proxy configuration for matrix domain deleted - name: Ensure Matrix nginx-proxy configuration for matrix domain deleted
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_nginx_proxy_confd_path }}/matrix-domain.conf" path: "{{ matrix_nginx_proxy_confd_path }}/matrix-domain.conf"

@ -36,9 +36,3 @@
src: "{{ role_path }}/templates/systemd/matrix-ntfy.service.j2" src: "{{ role_path }}/templates/systemd/matrix-ntfy.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-ntfy.service"
mode: 0644 mode: 0644
register: matrix_ntfy_systemd_service_result
- name: Ensure systemd reloaded after matrix-ntfy.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_ntfy_systemd_service_result.changed"

@ -49,9 +49,3 @@
src: "{{ role_path }}/templates/systemd/matrix-postgres-backup.service.j2" src: "{{ role_path }}/templates/systemd/matrix-postgres-backup.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service"
mode: 0644 mode: 0644
register: matrix_postgres_backup_systemd_service_result
- name: Ensure systemd reloaded after matrix-postgres-backup.service installation
ansible.builtin.service:
daemon_reload: true
when: matrix_postgres_backup_systemd_service_result.changed | bool

@ -50,9 +50,3 @@
src: "{{ role_path }}/templates/systemd/matrix-prometheus.service.j2" src: "{{ role_path }}/templates/systemd/matrix-prometheus.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-prometheus.service"
mode: 0644 mode: 0644
register: matrix_prometheus_systemd_service_result
- name: Ensure systemd reloaded after matrix-prometheus.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_prometheus_systemd_service_result.changed | bool"

@ -103,15 +103,10 @@
src: "{{ role_path }}/templates/systemd/matrix-registration.service.j2" src: "{{ role_path }}/templates/systemd/matrix-registration.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-registration.service"
mode: 0644 mode: 0644
register: matrix_registration_systemd_service_result
- name: Ensure systemd reloaded after matrix-registration.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_registration_systemd_service_result.changed | bool"
- name: Ensure matrix-registration.service restarted, if necessary - name: Ensure matrix-registration.service restarted, if necessary
ansible.builtin.service: ansible.builtin.service:
name: "matrix-registration.service" name: "matrix-registration.service"
state: restarted state: restarted
daemon_reload: true
when: "matrix_registration_requires_restart | bool" when: "matrix_registration_requires_restart | bool"

@ -36,9 +36,3 @@
src: "{{ role_path }}/templates/systemd/matrix-sygnal.service.j2" src: "{{ role_path }}/templates/systemd/matrix-sygnal.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-sygnal.service"
mode: 0644 mode: 0644
register: matrix_sygnal_systemd_service_result
- name: Ensure systemd reloaded after matrix-sygnal.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_sygnal_systemd_service_result.changed | bool"

@ -43,9 +43,3 @@
src: "{{ role_path }}/templates/goofys/systemd/matrix-goofys.service.j2" src: "{{ role_path }}/templates/goofys/systemd/matrix-goofys.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-goofys.service"
mode: 0644 mode: 0644
register: matrix_goofys_systemd_service_result
- name: Ensure systemd reloaded after matrix-goofys.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_goofys_systemd_service_result.changed"

Loading…
Cancel
Save