ajout des fichiers ansible

This commit is contained in:
“cameron.desrayaud”
2021-12-13 17:09:50 +01:00
parent 34833c4478
commit d9bb729bc1
18 changed files with 326 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
---
# handlers file for mariadb
- name: set mariadb log selinux
sefcontext:
target: '/var/log/mariadb(/.*)?'
setype: mysqld_log_t
state: present
- name: restart mariadb server
systemd:
name: "{{ mariadb_service }}"
state: restarted
enabled: yes
- name: Remove test database priviledges
command: mysql -u root -p{{ mysql_root_password }} -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
- name: Flush Priviliges
command: mysql -u root -p{{ mysql_root_password }} -e "FLUSH PRIVILEGES"
- name: Update repo cache
apt:
update_cache: yes