Skip to content
Snippets Groups Projects
Verified Commit 6488df5a authored by Florian Pritz's avatar Florian Pritz
Browse files

mariadb: Copy config before starting service


If the service is started before the config is copied, we can't recover
from a typo in the config file because maraidb will refused to start. At
least not without manually fixing that typo. This way the typo can be
fixed in ansible and then deployed normally.

Signed-off-by: default avatarFlorian Pritz <bluewind@xinu.at>
parent be940a62
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,11 @@
args:
creates: /var/lib/mysql/mysql
- name: configure mariadb
template: src=server.cnf.j2 dest=/etc/mysql/my.cnf
notify:
- restart mariadb
- name: start and enable the service
service: name=mariadb state=started enabled=yes
......@@ -34,11 +39,6 @@
template: src=client.cnf.j2 dest=/root/.my.cnf
no_log: true
- name: configure mariadb
template: src=server.cnf.j2 dest=/etc/mysql/my.cnf
notify:
- restart mariadb
- name: configure zabbix-agent user
mysql_user: user={{zabbix_agent_mysql_user}} host=localhost password={{mariadb_users.zabbix_agent}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment