# HG changeset patch # User anatofuz # Date 1599017134 -32400 # Node ID 4545b64566233388654e6c0e0889aa509cb4cc29 # Parent c3ec7761518a9e65b56cb8827c4139ae40b0dee9 s/with_items/loop/ diff -r c3ec7761518a -r 4545b6456623 hosts --- a/hosts Tue Sep 18 17:11:38 2018 +0900 +++ b/hosts Wed Sep 02 12:25:34 2020 +0900 @@ -1,4 +1,4 @@ [test] -test-fedora +localhost:2222 [test:vars] ansible_python_interpreter=/usr/bin/python3 diff -r c3ec7761518a -r 4545b6456623 main.yml --- a/main.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/main.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,5 +1,5 @@ - hosts: all - user: mitsuki + user: anatofuz tasks: - import_tasks: tasks/install-firewalld.yml - import_tasks: tasks/setting-firewalld.yml diff -r c3ec7761518a -r 4545b6456623 tasks/install-firewalld.yml --- a/tasks/install-firewalld.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/install-firewalld.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,5 +1,7 @@ - - name: install dnf python-firewall - become: yes - dnf: name={{ item }} state=latest - with_items: - - python3-firewall +--- + +- name: install dnf python-firewall + become: yes + dnf: + name: python3-firewall + state: latest diff -r c3ec7761518a -r 4545b6456623 tasks/install-mariadb.yml --- a/tasks/install-mariadb.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/install-mariadb.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,17 +1,22 @@ - - name: install dnf packages - dnf: name={{ item }} state=latest - become: yes - with_items: - - mariadb - - mariadb-server - - MySQL-python3 - - libselinux-python +- name: install dnf packages + become: yes + dnf: + name: {{ item }} + state: latest + loop: + - mariadb + - mariadb-server + - MySQL-python3 + - libselinux-python -# start mariadb - - service: name=mariadb state=restarted - become: yes +- name: start mariadbd + become: yes + service: + name: mariadb + state: restarted -# chkconfig enabled mariadb - - service: name=mariadb enabled=yes - become: yes - +- name: chkconfig enabled mariadb + become: yes + service: + name: mariadb + enabled : yes diff -r c3ec7761518a -r 4545b6456623 tasks/install-php-mbstring.yml --- a/tasks/install-php-mbstring.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/install-php-mbstring.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,5 +1,5 @@ - - name: install dnf packages - become: yes - dnf: name={{ item }} state=latest - with_items: - - php-mbstring +- name: install dnf packages + become: yes + dnf: + name: 'php-mbstring' + state: latest diff -r c3ec7761518a -r 4545b6456623 tasks/install-php.yml --- a/tasks/install-php.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/install-php.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,6 +1,8 @@ - - name: install dnf packages - become: yes - dnf: name={{ item }} state=latest - with_items: - - php - - php-mysqlnd +- name: install php packages + become: yes + dnf: + name: {{ item }} + state: latest + loop: + - php + - php-mysqlnd diff -r c3ec7761518a -r 4545b6456623 tasks/setting-firewalld.yml --- a/tasks/setting-firewalld.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/setting-firewalld.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,10 +1,15 @@ +--- - name: Setting Firewalld - firewalld: permanent=true service={{ item.service }} state={{ item.state }} - with_items: - - { service: http, state: enabled } - - { service: https, state: enabled } become: yes + firewalld: + service: {{ item }} + permanent: yes + state: enabled + loop: + - http + - https + - name: Restart service service: name=firewalld state=restarted enabled=yes - become: yes \ No newline at end of file + become: yes diff -r c3ec7761518a -r 4545b6456623 tasks/setting-wordpress.yml --- a/tasks/setting-wordpress.yml Tue Sep 18 17:11:38 2018 +0900 +++ b/tasks/setting-wordpress.yml Wed Sep 02 12:25:34 2020 +0900 @@ -1,9 +1,9 @@ - name: WordPress Download - get_url: url="https://ja.wordpress.org/wordpress-4.8.2-ja.tar.gz" dest=/tmp + get_url: url="https://ja.wordpress.org/wordpress-5.2.3-ja.tar.gz" dest=/tmp - name: unarchive source become: yes - command: tar zxvf /tmp/wordpress-4.8.2-ja.tar.gz chdir=/var/www/html + command: tar zxvf /tmp/wordpress-5.2.3-ja.tar.gz chdir=/var/www/html - name: change dir / files permission become: yes