Hello, 
I need somes precisions about mysql_db module. I try to create Apache 
Guacamole role.

This is my playbook:

FIRST TASK:
- name: Creation databases guacamole
community.mysql.mysql_db:
login_host: "{{ database_ip }}"
login_user: root
login_password: "{{ mariadb_root_pass }}"
name: "guacamole_db"
encoding: utf8
state: present

SECOND TASK:
- name: Install database MySQL
community.mysql.mysql_db:
login_host: "{{ database_ip }}"
login_user: root
login_password: "{{ mariadb_root_pass }}"
name: "guacamole_db"
state: import
target: "/srv/live/{{ app_name }}/initdb.sql"


When variable "{{ database_ip }}" is set to *localhost*
First Task works,

Second Task, 
I get this error: 
"msg": "ERROR 2002 (HY000): Can't connect to local MySQL server through 
socket '/var/run/mysqld/mysqld.sock' (2)\n"

When variable "{{ database_ip }}" is set to *127.0.0.1*
Two tasks work.

My MariaDB is in Docker with port 3306 expose.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c90b6add-60d1-4131-9ba2-5692c99222d6n%40googlegroups.com.

Reply via email to