Add default file for root necessary since using venv instead of docker

This commit is contained in:
Laurent Indermuehle 2022-12-09 14:10:35 +01:00
commit 8c5806848f
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
7 changed files with 48 additions and 12 deletions

View file

@ -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