TASK [Cria o banco do MySQL] *** fatal: [172.17.177.40]: FAILED! => {"changed": false, "msg": "unable to find /root/.my.cnf. Exception message: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")"}
Playbook:
---
- hosts: all
tasks:
- name: 'Instala pacotes de dependencias do sistema operacional - SO'
apt:
name: "{{ item }}"
state: latest
become: yes
with_items:
- php5
- apache2
- libapache2-mod-php5
- php5-gd
- libssh2-php
- php5-mcrypt
- python-mysqldb
- php5-mysql
- name: 'Cria o banco do MySQL'
mysql_db:
login_user: root
name: wordpress.db
state: present
become: yes