Mercurial > hg > Members > anatofuz > wordpress_ansible
changeset 11:faa3afacbfd5
mariadb install as a role
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 02 Sep 2020 13:47:47 +0900 |
parents | a2003ccc0166 |
children | 626b2d034d92 |
files | roles/install-mariadb/tasks/main.yml tasks/install-mariadb.yml |
diffstat | 2 files changed, 18 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roles/install-mariadb/tasks/main.yml Wed Sep 02 13:47:47 2020 +0900 @@ -0,0 +1,18 @@ +--- +- name: install dnf packages + become: yes + dnf: + name: {{ item }} + state: latest + loop: + - mariadb + - mariadb-server + - MySQL-python3 + - libselinux-python + +- name: start and enabled mariadb + become: yes + systemd: + name: mariadb + state: restarted + enabled: yes
--- a/tasks/install-mariadb.yml Wed Sep 02 13:33:55 2020 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -- name: install dnf packages - become: yes - dnf: - name: {{ item }} - state: latest - loop: - - mariadb - - mariadb-server - - MySQL-python3 - - libselinux-python - -- name: start mariadbd - become: yes - service: - name: mariadb - state: restarted - -- name: chkconfig enabled mariadb - become: yes - service: - name: mariadb - enabled : yes