ansible-role-apache/lemp-rhel7/roles/mariadb/tasks/main.yml
2016-06-09 21:16:01 +10:00

21 lines
560 B
YAML

---
# This playbook will install MariaDB and create db user and give permissions.
- name: Install MariaDB package
yum: name={{ item }} state=installed
with_items:
- mariadb-server
- MySQL-python
- libselinux-python
- libsemanage-python
- name: Create Mysql configuration file
template: src=my.cnf.j2 dest=/etc/my.cnf
notify:
- restart mariadb
- name: Create MariaDB log file
file: path=/var/log/mysqld.log state=touch owner=mysql group=mysql mode=0775
- name: Start MariaDB Service
service: name=mariadb state=started enabled=yes