Skip to content

Commit 9a86bf4

Browse files
authored
Merge pull request #562 from dw-ec/master
Installation of root user's .my.cnf file should be optional
2 parents e508bc5 + d48a7ad commit 9a86bf4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ overwrite_global_mycnf: true
2323
# mysql_config_file: /etc/my.cnf
2424
# mysql_config_include_dir: /etc/my.cnf.d
2525

26+
# Whether to copy root user's config file with credentials to their homedir
27+
mysql_copy_root_user_mycnf: true
28+
2629
# Pass in a comma-separated list of repos to use (e.g. "remi,epel"). Used only
2730
# for RedHat systems (and derivatives).
2831
mysql_enablerepo: ""

tasks/secure-installation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
group: root
9696
mode: 0600
9797
no_log: "{{ mysql_hide_passwords }}"
98-
when: mysql_install_packages | bool or mysql_root_password_update
98+
when:
99+
- mysql_install_packages | bool or mysql_root_password_update
100+
- mysql_copy_root_user_mycnf
99101

100102
- name: Get list of hosts for the anonymous user.
101103
ansible.builtin.command: mysql -NBe "SELECT Host FROM mysql.user WHERE User = ''"

0 commit comments

Comments
 (0)