mise au point

rajout tache creation bdd
This commit is contained in:
2022-01-07 11:03:11 +01:00
parent 6b2c0c885e
commit 8dbf7e2d9e
4 changed files with 28 additions and 1 deletions

15
tasks/db.yml Normal file
View File

@@ -0,0 +1,15 @@
---
- name: create database
community.mysql.mysql_db:
login_user: root
name: "{{ apache_db_name }}"
state: present
- name: create db user
community.mysql.mysql_user:
name: "{{ apache_db_user }}"
password: "{{ apache_db_password }}"
update_password: on_create
priv: "{{ apache_db_name }}.*:ALL"
state: present

View File

@@ -75,4 +75,9 @@
- name: zabbix setup
import_tasks: zabbix.yml
when: apache_use_zabbix|bool
tags: zabbix, ssl
tags: zabbix, ssl
- name: db setup
import_tasks: db.yml
when: apache_use_database
tags: db