|
|
@ -1,21 +1,23 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure systemd reloaded
|
|
|
|
- name: Ensure systemd is reloaded
|
|
|
|
service:
|
|
|
|
service:
|
|
|
|
daemon_reload: yes
|
|
|
|
daemon_reload: yes
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure Matrix services stopped
|
|
|
|
- name: Ensure Matrix services are stopped
|
|
|
|
service:
|
|
|
|
service:
|
|
|
|
name: "{{ item }}"
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: stopped
|
|
|
|
state: stopped
|
|
|
|
with_items: "{{ matrix_systemd_services_list }}"
|
|
|
|
with_items: "{{ matrix_systemd_services_list }}"
|
|
|
|
|
|
|
|
when: not ansible_check_mode
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure Matrix services started
|
|
|
|
- name: Ensure Matrix services are started
|
|
|
|
service:
|
|
|
|
service:
|
|
|
|
name: "{{ item }}"
|
|
|
|
name: "{{ item }}"
|
|
|
|
enabled: yes
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
state: started
|
|
|
|
with_items: "{{ matrix_systemd_services_list }}"
|
|
|
|
with_items: "{{ matrix_systemd_services_list }}"
|
|
|
|
|
|
|
|
when: not ansible_check_mode
|
|
|
|
|
|
|
|
|
|
|
|
# If we check service state immediately, we may succeed,
|
|
|
|
# If we check service state immediately, we may succeed,
|
|
|
|
# because it takes some time for the service to attempt to start and actually fail.
|
|
|
|
# because it takes some time for the service to attempt to start and actually fail.
|
|
|
|