We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7540359 commit dc0d60aCopy full SHA for dc0d60a
1 file changed
roles/load_balancer/tasks/main.yml
@@ -4,10 +4,10 @@
4
src: nginx.conf.j2
5
dest: /etc/nginx/conf.d/sample-appliance.conf
6
mode: '0644'
7
- register: nginx_conf
+ notify: Restart Nginx
8
9
-- name: Restart Nginx if required
10
- service:
11
- name: nginx
12
- state: restarted
13
- when: nginx_conf is changed
+ handlers:
+ - name: Restart Nginx
+ ansible.builtin.service:
+ name: nginx
+ state: restarted
0 commit comments