From cd72e0933d16b0fd174c21ce973b04b74143ef1f Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 23 Mar 2015 19:22:50 +0100 Subject: Deploy the root password file --- roles/mariadb/tasks/main.yml | 2 ++ roles/mariadb/templates/my.cnf | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 roles/mariadb/templates/my.cnf diff --git a/roles/mariadb/tasks/main.yml b/roles/mariadb/tasks/main.yml index 2327e80..b6a4fe6 100644 --- a/roles/mariadb/tasks/main.yml +++ b/roles/mariadb/tasks/main.yml @@ -7,6 +7,8 @@ - template: src=custom.cnf dest=/etc/my.cnf.d/custom.cnf notify: restart mariadb +- template: src=my.cnf dest=/root/.my.cnf mode=600 owner=root group=root + - service: name=mariadb enabled=yes state=started - copy: mode=0755 src=dump_mariadb.sh dest=/usr/local/bin/dump_mariadb.sh diff --git a/roles/mariadb/templates/my.cnf b/roles/mariadb/templates/my.cnf new file mode 100644 index 0000000..21e6a1b --- /dev/null +++ b/roles/mariadb/templates/my.cnf @@ -0,0 +1,4 @@ +[client] +user = root +password = {{ mariadb_root_pw }} + -- cgit