We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c44dd8 commit 88fdf4aCopy full SHA for 88fdf4a
1 file changed
Ansible/deploy_nginx_apache2.yaml
@@ -26,12 +26,25 @@
26
27
- name: Copy website files to nginx server
28
synchronize:
29
- src: /tmp/website/index.html
30
- dest: /usr/share/nginx/html/
+ src: /tmp/website/
+ dest: /var/www/html/
31
when: "'nginx' in inventory_hostname"
32
+ notify: Restart Nginx
33
34
- name: Copy website files to apache server
35
36
37
dest: /var/www/html/
38
when: "'apache' in inventory_hostname"
39
+ notify: Restart Apache
40
+
41
+ handlers:
42
+ - name: Restart Nginx
43
+ service:
44
+ name: nginx
45
+ state: restarted
46
47
+ - name: Restart Apache
48
49
+ name: apache2
50
0 commit comments