We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4291346 commit 78047b6Copy full SHA for 78047b6
2/Example_Ansible.md
@@ -160,12 +160,6 @@ app1_cnf:
160
mode: 0640
161
register: a2_cnf
162
163
- - name: Reloading Apache2 if config changed
164
- ansible.builtin.systemd:
165
- name: 'apache2.service'
166
- state: reloaded
167
- when: a2_cnf.changed
168
-
169
- name: Enabling Apache2 modules
170
community.general.apache2_module:
171
state: present
@@ -176,6 +170,13 @@ app1_cnf:
176
- 'headers'
177
- 'rewrite'
178
172
- 'http2'
173
+ register: a2_mods
174
+
175
+ - name: Reloading Apache2 if config/mods changed
+ ansible.builtin.systemd:
+ name: 'apache2.service'
+ state: reloaded
179
+ when: a2_cnf.changed or a2_mods.changed
180
181
- name: Update service
182
hosts: web_app1
0 commit comments