mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-10 20:00:18 +01:00
20 lines
519 B
YAML
20 lines
519 B
YAML
---
|
|
- name: Install Mysql package
|
|
yum: name={{ item }} state=present
|
|
with_items:
|
|
- mysql-server
|
|
- MySQL-python
|
|
- libselinux-python
|
|
- libsemanage-python
|
|
|
|
- name: Configure SELinux to start mysql on any port
|
|
seboolean: name=mysql_connect_any state=true persistent=yes
|
|
when: ansible_selinux.status == "enabled"
|
|
|
|
- name: Create Mysql configuration file
|
|
template: src=my.cnf.j2 dest=/etc/my.cnf
|
|
notify:
|
|
- restart mysql
|
|
|
|
- name: Start Mysql Service
|
|
service: name=mysqld state=started enabled=yes
|