Using ansible.builtin where possible

This commit is contained in:
Charles Wright
2022-08-05 13:44:56 -05:00
parent 47caba38fb
commit 0ee44adde8
5 changed files with 11 additions and 11 deletions

View File

@ -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"