changeset 17:a3a179e8fac8

fix loop-syntax
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 02 Sep 2020 15:50:19 +0900
parents c0313aebc975
children 2271e3210b56
files hosts roles/install-firewalld/tasks/main.yml roles/install-mariadb/tasks/main.yml roles/install-php/tasks/main.yml roles/restart-handlers/handlers/main.yml
diffstat 5 files changed, 19 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hosts	Wed Sep 02 15:26:10 2020 +0900
+++ b/hosts	Wed Sep 02 15:50:19 2020 +0900
@@ -1,4 +1,5 @@
 [test]
-localhost:2222
+test-fedora
+
 [test:vars]
 ansible_python_interpreter=/usr/bin/python3
--- a/roles/install-firewalld/tasks/main.yml	Wed Sep 02 15:26:10 2020 +0900
+++ b/roles/install-firewalld/tasks/main.yml	Wed Sep 02 15:50:19 2020 +0900
@@ -9,9 +9,11 @@
 - name: Setting Firewalld
   become: yes
   firewalld:
-    service: {{ item }}
+    zone: public
+    service:
+      -  "{{ item }}"
     permanent: yes
-    state: enabled
+    state: enable
   loop:
     - http
     - https
--- a/roles/install-mariadb/tasks/main.yml	Wed Sep 02 15:26:10 2020 +0900
+++ b/roles/install-mariadb/tasks/main.yml	Wed Sep 02 15:50:19 2020 +0900
@@ -2,7 +2,8 @@
 - name: install dnf packages
   become: yes
   dnf:
-    name: {{ item }}
+    name:
+      - "{{ item }}"
     state: latest
   loop:
     - mariadb
--- a/roles/install-php/tasks/main.yml	Wed Sep 02 15:26:10 2020 +0900
+++ b/roles/install-php/tasks/main.yml	Wed Sep 02 15:50:19 2020 +0900
@@ -1,9 +1,11 @@
 - name: install php packages
   become: yes
   dnf:
-    name: {{ item }}
+    name:
+      - "{{ item }}"
     state: latest
   loop:
     - php
     - php-mysqlnd
     - php-mbstring
+    - php-fpm
--- a/roles/restart-handlers/handlers/main.yml	Wed Sep 02 15:26:10 2020 +0900
+++ b/roles/restart-handlers/handlers/main.yml	Wed Sep 02 15:50:19 2020 +0900
@@ -13,3 +13,11 @@
     name: nginx
     state: restarted
     enabled: yes
+
+
+- name: restart_php_fpm
+  become: yes
+  systemd:
+    name: php-fpm
+    state: restarted
+    enbaled: yes