diff --git a/roles/matrix-conduit/tasks/conduit/setup.yml b/roles/matrix-conduit/tasks/conduit/setup.yml index 055fbd271..c4d3d6bea 100644 --- a/roles/matrix-conduit/tasks/conduit/setup.yml +++ b/roles/matrix-conduit/tasks/conduit/setup.yml @@ -1,7 +1,7 @@ --- - name: Ensure Conduit config path exists - file: + ansible.builtin.file: path: "{{ matrix_conduit_config_path }}" state: directory mode: 0750 @@ -10,7 +10,7 @@ when: "matrix_conduit_enabled|bool" - name: Ensure Conduit data path exists - file: + ansible.builtin.file: path: "{{ matrix_conduit_data_path }}" state: directory mode: 0770 diff --git a/roles/matrix-conduit/tasks/conduit/setup_install.yml b/roles/matrix-conduit/tasks/conduit/setup_install.yml index 5611e3e3d..927d9fa3e 100644 --- a/roles/matrix-conduit/tasks/conduit/setup_install.yml +++ b/roles/matrix-conduit/tasks/conduit/setup_install.yml @@ -11,7 +11,7 @@ until: result is not failed - name: Ensure Conduit configuration installed - template: + ansible.builtin.template: src: "{{ role_path }}/templates/conduit/conduit.toml.j2" dest: "{{ matrix_conduit_config_path }}/conduit.toml" mode: 0644 @@ -19,13 +19,13 @@ group: "{{ matrix_user_groupname }}" - name: Ensure matrix-conduit.service installed - template: + ansible.builtin.template: src: "{{ role_path }}/templates/conduit/systemd/matrix-conduit.service.j2" dest: "{{ matrix_systemd_path }}/matrix-conduit.service" mode: 0644 register: matrix_conduit_systemd_service_result - name: Ensure systemd reloaded after matrix-conduit.service installation - service: + ansible.builtin.systemd: daemon_reload: true when: "matrix_conduit_systemd_service_result.changed|bool" diff --git a/roles/matrix-conduit/tasks/conduit/setup_uninstall.yml b/roles/matrix-conduit/tasks/conduit/setup_uninstall.yml index 73722287d..3bbbc3a78 100644 --- a/roles/matrix-conduit/tasks/conduit/setup_uninstall.yml +++ b/roles/matrix-conduit/tasks/conduit/setup_uninstall.yml @@ -1,12 +1,12 @@ --- - name: Check existence of matrix-conduit service - stat: + ansible.builtin.stat: path: "{{ matrix_systemd_path }}/matrix-conduit.service" register: matrix_conduit_service_stat - name: Ensure matrix-conduit is stopped - service: + ansible.builtin.systemd: name: matrix-conduit state: stopped daemon_reload: true @@ -14,13 +14,13 @@ when: "matrix_conduit_service_stat.stat.exists" - name: Ensure matrix-conduit.service doesn't exist - file: + ansible.builtin.file: path: "{{ matrix_systemd_path }}/matrix-conduit.service" state: absent when: "matrix_conduit_service_stat.stat.exists" - name: Ensure systemd reloaded after matrix-conduit.service removal - service: + ansible.builtin.systemd: daemon_reload: true when: "matrix_conduit_service_stat.stat.exists" diff --git a/roles/matrix-conduit/tasks/init.yml b/roles/matrix-conduit/tasks/init.yml index 464278b75..11b53e794 100644 --- a/roles/matrix-conduit/tasks/init.yml +++ b/roles/matrix-conduit/tasks/init.yml @@ -1,5 +1,5 @@ --- -- set_fact: +- ansible.builtin.set_fact: matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-conduit.service'] }}" when: matrix_conduit_enabled|bool diff --git a/roles/matrix-conduit/tasks/main.yml b/roles/matrix-conduit/tasks/main.yml index 20d91ac8e..e264853e5 100644 --- a/roles/matrix-conduit/tasks/main.yml +++ b/roles/matrix-conduit/tasks/main.yml @@ -11,7 +11,7 @@ - setup-conduit - name: Mark matrix-conduit role as executed - set_fact: + ansible.builtin.set_fact: matrix_conduit_role_executed: true tags: - always