need to use socket for mysql

This commit is contained in:
2024-07-24 13:30:29 +02:00
parent 032bcc7c0f
commit df99ddea83

View File

@@ -22,12 +22,14 @@
state: present # not required. choices: present;absent;dump;import. The database state state: present # not required. choices: present;absent;dump;import. The database state
encoding: "utf8" # not required. Encoding mode to use, examples include C(utf8) or C(latin1_swedish_ci) encoding: "utf8" # not required. Encoding mode to use, examples include C(utf8) or C(latin1_swedish_ci)
config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read. config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read.
login_unix_socket: "{{ pdns_mysql_socket }}" # not required. The path to a Unix domain socket for local connections.
- name: nameserver | powerdns-server | import database - name: nameserver | powerdns-server | import database
mysql_db: mysql_db:
name: "{{ pdns_db_name }}" name: "{{ pdns_db_name }}"
state: import state: import
target: "{{ pdns_mysql_schema }}" # not required. Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL files (C(.sql)) as well as bzip2 (C(.bz2)), gzip (C(.gz)) and xz (Added in 2.0) compressed files are supported. target: "{{ pdns_mysql_schema }}" # not required. Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL files (C(.sql)) as well as bzip2 (C(.bz2)), gzip (C(.gz)) and xz (Added in 2.0) compressed files are supported.
config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read. config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read.
login_unix_socket: "{{ pdns_mysql_socket }}" # not required. The path to a Unix domain socket for local connections.
- name: nameserver | powerdns-server | create database user - name: nameserver | powerdns-server | create database user
mysql_user: mysql_user:
name: "{{ pdns_db_user }}" # required. Name of the user (role) to add or remove. name: "{{ pdns_db_user }}" # required. Name of the user (role) to add or remove.
@@ -39,6 +41,7 @@
state: present # not required. choices: absent;present. Whether the user should exist. When C(absent), removes the user. state: present # not required. choices: absent;present. Whether the user should exist. When C(absent), removes the user.
update_password: on_create # not required. choices: always;on_create. C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users. update_password: on_create # not required. choices: always;on_create. C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users.
config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read. config_file: "/etc/mysql/my.cnf" # not required. Specify a config file from which user and password are to be read.
login_unix_socket: "{{ pdns_mysql_socket }}" # not required. The path to a Unix domain socket for local connections.
- name: nameserver | powerdns-server | copy config - name: nameserver | powerdns-server | copy config
template: template:
src: "powerdns-server-pri-mysql-config.j2" src: "powerdns-server-pri-mysql-config.j2"