mysql: Extracted mysql_socket_path into global var

dehydrated
Felix Stupp 5 years ago
parent f91ef20682
commit 62758cac7c
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -110,6 +110,8 @@ global_interfaces_directory: "/etc/network/interfaces.d"
global_log_directory: "/var/log"
global_mysql_socket_path: "/var/run/mysqld/mysqld.sock"
global_nfs_port: "2049" # for version 4
global_nfs_directory: "{{ global_webservers_directory }}/nfs"

@ -21,7 +21,7 @@
user: "root"
password: "{{ mysql_root_password }}"
host: "localhost"
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
@ -30,7 +30,7 @@
user: ""
host_all: yes
state: absent
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
@ -39,7 +39,7 @@
user: "root"
password: "{{ mysql_root_password }}"
host: "::1"
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
@ -48,7 +48,7 @@
user: "root"
password: "{{ mysql_root_password }}"
host: "127.0.0.1"
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
@ -57,7 +57,7 @@
user: "root"
host: "{{ inventory_hostname }}"
state: absent
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
@ -65,7 +65,7 @@
mysql_db:
db: "test"
state: absent
login_unix_socket: /var/run/mysqld/mysqld.sock
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"

@ -16,7 +16,7 @@
state: import
name: "{{ database_name }}"
target: "{{ sql_temp.path }}"
login_unix_socket: "/var/run/mysqld/mysqld.sock"
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"

@ -10,14 +10,14 @@
password: "{{ database_pass }}"
update_password: always
priv: "{{ database_name }}.*:ALL"
login_unix_socket: "/var/run/mysqld/mysqld.sock"
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
- name: Create SQL database {{ database_name }}
mysql_db:
db: "{{ database_name }}"
login_unix_socket: "/var/run/mysqld/mysqld.sock"
login_unix_socket: "{{ global_mysql_socket_path }}"
login_user: root
login_password: "{{ mysql_root_password }}"
register: create_database

Loading…
Cancel
Save