I am trying to install mysql using ANSIBLE on CentOS7(i have no idea why every documention in the world now ONLY talks ablotu Ubuntu and NO CentOS anymore…really SAD!)
here is my create_db.yml file
I am trying to install mysql using ANSIBLE on CentOS7(i have no idea why every documention in the world now ONLY talks ablotu Ubuntu and NO CentOS anymore…really SAD!)
here is my create_db.yml file
Have you installed MySQL before and changed the password? If so, specify
the user/password with privileges to create databases.
- name: Install Python MySQLdb
yum:
name: MySQL-python
state: latest
- name: Create the Drupal database
mysql_db:
name: db_name
login_user: XXX
login_password: XXX
state: present
- name: Create the Drupal user
mysql_user:
name: db_user
password: db_password
priv: "{{ db_name }}.*:ALL"
host: localhost
You can simplify your setup.yml playbook too:
- name: Install packages
yum:
name: "{{ item }}"
state: latest
with_items:
- mariadb-server
- php-gd
- php-ldap
- php-odbc
- php-pear
- php-xml
- php-xmlrpc
- php-mbstring
- php-snmp
- php-soap
- curl
- curl-devel
- php-mysql
Giovanni