changeset 21:0db847234dbe

...
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 02 Sep 2020 22:12:33 +0900
parents 8842962276a3
children 090c14a0be80
files main.yml roles/install-firewalld/tasks/main.yml roles/restart-handlers/handlers/main.yml
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main.yml	Wed Sep 02 21:43:11 2020 +0900
+++ b/main.yml	Wed Sep 02 22:12:33 2020 +0900
@@ -1,10 +1,10 @@
 - hosts: all
   user: anatofuz
   roles:
+    - restart-handlers
     - update-dnf
     - install-firewalld
     - install-nginx
     - install-php
     - install-mariadb
     - install-wordpress
-    - restart-handlers
--- a/roles/install-firewalld/tasks/main.yml	Wed Sep 02 21:43:11 2020 +0900
+++ b/roles/install-firewalld/tasks/main.yml	Wed Sep 02 22:12:33 2020 +0900
@@ -10,9 +10,11 @@
   become: yes
   firewalld:
     service: "{{ item }}"
+    zone: FedoraServer
     permanent: yes
     state: enabled
   loop:
     - http
     - https
+  changed_when: True
   notify: restart_firewalld
--- a/roles/restart-handlers/handlers/main.yml	Wed Sep 02 21:43:11 2020 +0900
+++ b/roles/restart-handlers/handlers/main.yml	Wed Sep 02 22:12:33 2020 +0900
@@ -4,6 +4,7 @@
   systemd:
     name: firewalld
     state: restarted
+    daemon_reload: yes
     enabled: yes
 
 
@@ -12,6 +13,7 @@
   systemd:
     name: nginx
     state: restarted
+    daemon_reload: yes
     enabled: yes
 
 
@@ -20,4 +22,5 @@
   systemd:
     name: php-fpm
     state: restarted
+    daemon_reload: yes
     enbaled: yes