You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tasks/config-FreeBSD.yml
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
- name: Template the roadrunner config
3
-
register: roadrunner_template_config_result
2
+
- name: Template the roadrunner config ({{ roadrunner_config.key }})
3
+
register: roadrunner_template_config_result
4
4
loop_control:
5
5
label: "{{ roadrunner_config.key }}"
6
6
ansible.builtin.template:
@@ -22,12 +22,12 @@
22
22
owner: root
23
23
mode: "0644"
24
24
25
-
- name: Enable and start the roadrunner-{{ roadrunner_config.key }} service
26
-
when: roadrunner_php_script_exists.stat.exists
25
+
- name: Enable and start the roadrunner-{{ roadrunner_config.key }} service if PHP script exists
27
26
register: roadrunner_service_supervisord_started
28
27
community.general.supervisorctl:
29
28
name: "roadrunner-{{ roadrunner_config.key }}"
30
-
state: present
29
+
state: "{{ 'present' if roadrunner_php_script_exists.stat.exists else 'absent' }}"
30
+
stop_before_removing: yes
31
31
32
32
- name: Restart the roadrunner-{{ roadrunner_config.key }} service
33
33
when: roadrunner_php_script_exists.stat.exists and not roadrunner_service_supervisord_started.changed and (roadrunner_template_service_config_result.changed or roadrunner_template_config_result.changed or (roadrunner_version is defined and roadrunner_version.stdout != roadrunner.version))
0 commit comments