Commit 9e655f80 authored by Florian Pritz's avatar Florian Pritz
Browse files

Improve group vars vault usage for mariadb

parent 12b386da
$ANSIBLE_VAULT;1.1;AES256
36306139396131613761383262363834343161633864333734633466366339663864663966326265
6466643864646139616137646330373865613635316664620a653535363962633631623766343666
66653739653330323934613465356465656138636433666161333939323364306234393834313261
6130306539643631610a643831656536303263306536613330386435353765326438326639313030
31616632643137373633386365346339623332313038646234646432633062623439316465346235
63613461396335646431393266323835333562393762646637633632373537346432333435396437
33393862306530343433636265316535393661373931366561373561336533386136616363303935
63316466393032396163376166623337643561346331356564383565303465646433616462346533
62353265346235616537613537633236643831643630623762396466346461646564
61633639383862666130373235303065373166613664316232343133363536633231303937386333
6161623639616536663962306163363038316530396631390a633362393039383665626131663636
35366265346164646262626263383036353765326461366437313861623164353761343663323661
6134653333623833310a623930306530636635666136343439616632363431313766316134623064
62646639343134623538623665616538366335616633353536363761663835623863626264663866
62333039336632316638393233376235643033623439363165336233623364376664613462373132
30663162366634656436306138383261613864316333636564383730366165626331326233306130
35613137633165323036666235326164313935396266323466363436376536646531646562643235
39356563663234663635333563623862646636366330346434326138386637333563
......@@ -7,5 +7,5 @@ filesystem: "ext4"
mysql_backup_dir: "/root/backup-mysql"
mysql_backup_defaults: "/root/.backup-my.cnf"
mariadb_users:
vault_mariadb_users:
root: "{{encrypted_mariadb_users_root_password}}"
......@@ -48,12 +48,12 @@
no_log: true
- name: create archwiki db
mysql_db: name="{{ archwiki_db }}" login_host="{{ archwiki_db_host }}" login_password="{{ mariadb_users.root }}"
mysql_db: name="{{ archwiki_db }}" login_host="{{ archwiki_db_host }}" login_password="{{ vault_mariadb_users.root }}"
register: db_created
- name: create archwiki db user
mysql_user: name={{ archwiki_db_user }} password={{ archwiki_db_password }}
login_host="{{ archwiki_db_host }}" login_password="{{ mariadb_users.root }}"
login_host="{{ archwiki_db_host }}" login_password="{{ vault_mariadb_users.root }}"
priv="{{ archwiki_db }}.*:ALL"
no_log: true
......
[client]
user = root
password = "{{mariadb_users.root}}"
password = "{{vault_mariadb_users.root}}"
......@@ -41,12 +41,12 @@
no_log: true
- name: create flyspray db
mysql_db: name="{{ flyspray_db }}" login_host="{{ flyspray_db_host }}" login_password="{{ mariadb_users.root }}"
mysql_db: name="{{ flyspray_db }}" login_host="{{ flyspray_db_host }}" login_password="{{ vault_mariadb_users.root }}"
register: db_created
- name: create flyspray db user
mysql_user: name={{ flyspray_db_user }} password={{ flyspray_db_password }}
login_host="{{ flyspray_db_host }}" login_password="{{ mariadb_users.root }}"
login_host="{{ flyspray_db_host }}" login_password="{{ vault_mariadb_users.root }}"
priv="{{ flyspray_db }}.*:ALL"
no_log: true
......
......@@ -31,7 +31,7 @@
mysql_db: db=test state=absent
- name: set root password
mysql_user: user=root host={{ item }} password={{ mariadb_users.root }}
mysql_user: user=root host={{ item }} password={{ vault_mariadb_users.root }}
with_items:
- '127.0.0.1'
- '::1'
......@@ -43,7 +43,7 @@
no_log: true
- name: configure zabbix-agent user
mysql_user: user={{zabbix_agent_mysql_user}} host=localhost password={{mariadb_users.zabbix_agent}}
mysql_user: user={{zabbix_agent_mysql_user}} host=localhost password={{vault_mariadb_users.zabbix_agent}}
- name: install zabbix mysql config
template: src=zabbix_agentd.my.cnf.j2 dest=/etc/zabbix/zabbix_agentd.my.cnf owner=zabbix-agent group=zabbix-agent mode=0600
......
[client]
user=root
password={{ mariadb_users.root }}
password={{ vault_mariadb_users.root }}
[client]
user={{zabbix_agent_mysql_user}}
password={{mariadb_users.zabbix_agent}}
password={{vault_mariadb_users.zabbix_agent}}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment