mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-27 15:11:28 -07:00
Add default file for root necessary since using venv instead of docker
This commit is contained in:
parent
d781636f32
commit
8c5806848f
7 changed files with 48 additions and 12 deletions
|
@ -24,14 +24,14 @@
|
|||
- name: mysql_info - create default config file
|
||||
template:
|
||||
src: my.cnf.j2
|
||||
dest: /root/.my.cnf
|
||||
dest: "{{ playbook_dir }}/root/.my.cnf"
|
||||
mode: '0400'
|
||||
|
||||
# Create non-default MySQL config file with credentials
|
||||
- name: mysql_info - create non-default config file
|
||||
template:
|
||||
src: my.cnf.j2
|
||||
dest: /root/non-default_my.cnf
|
||||
dest: "{{ playbook_dir }}/root/non-default_my.cnf"
|
||||
mode: '0400'
|
||||
|
||||
###############
|
||||
|
@ -61,7 +61,7 @@
|
|||
login_user: '{{ mysql_user }}'
|
||||
login_host: '{{ mysql_host }}'
|
||||
login_port: '{{ mysql_primary_port }}'
|
||||
config_file: /root/non-default_my.cnf
|
||||
config_file: "{{ playbook_dir }}/root/non-default_my.cnf"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
|
@ -74,9 +74,9 @@
|
|||
file:
|
||||
path: '{{ item }}'
|
||||
state: absent
|
||||
with_items:
|
||||
- /root/.my.cnf
|
||||
- /root/non-default_my.cnf
|
||||
loop:
|
||||
- "{{ playbook_dir }}/.my.cnf"
|
||||
- "{{ playbook_dir }}/non-default_my.cnf"
|
||||
|
||||
# Access with password
|
||||
- name: mysql_info - check access with password
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue