mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-22 04:34:00 +00:00
Add matrix_services_autostart_enabled variable for preventing services autostart
Some people requested that `--tags=start` not set up service autostart. One can now do `--tags=start --extra-vars="matrix_services_autostart_enabled=false"` to just start services ones and not set up autostarting.
This commit is contained in:
parent
d64ad91c25
commit
90078dd296
@ -1,5 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Deterimne whether we should make services autostart
|
||||||
|
set_fact:
|
||||||
|
matrix_services_autostart_enabled_bool: "{{ true if matrix_services_autostart_enabled|default('') == '' else matrix_services_autostart_enabled|bool }}"
|
||||||
|
|
||||||
- name: Ensure systemd is reloaded
|
- name: Ensure systemd is reloaded
|
||||||
service:
|
service:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
@ -14,7 +18,7 @@
|
|||||||
- name: Ensure Matrix services are started
|
- name: Ensure Matrix services are started
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: yes
|
enabled: "{{ matrix_services_autostart_enabled_bool }}"
|
||||||
state: started
|
state: started
|
||||||
with_items: "{{ matrix_systemd_services_list }}"
|
with_items: "{{ matrix_systemd_services_list }}"
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
Loading…
Reference in New Issue
Block a user