On Wed, 04 Feb 2015 13:04 -0800, Eff Ggl <
thereal...@gmail.com>
wrote:
> TASK: [mysql | Create the Drupal database]
> ************************************
> failed: [ansiblev1] => {"failed": true}
> msg: unable to connect, check login_user and login_password are correct,
> or
> alternatively check ~/.my.cnf contains credentials
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