Mercurial > hg > Members > anatofuz > wordpress_ansible
changeset 8:4545b6456623
s/with_items/loop/
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 02 Sep 2020 12:25:34 +0900 |
parents | c3ec7761518a |
children | f4c9cb3b14a3 |
files | hosts main.yml tasks/install-firewalld.yml tasks/install-mariadb.yml tasks/install-php-mbstring.yml tasks/install-php.yml tasks/setting-firewalld.yml tasks/setting-wordpress.yml |
diffstat | 8 files changed, 54 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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