From 3ebeffe6d01f313c595d1f606cbcc755f1e027b7 Mon Sep 17 00:00:00 2001 From: Florian Pritz <bluewind@xinu.at> Date: Thu, 7 Jun 2018 00:16:47 +0200 Subject: [PATCH] Improve group vars vault usage for archwiki Signed-off-by: Florian Pritz <bluewind@xinu.at> --- group_vars/all/vault_archwiki.yml | 27 ++++++++++--------- roles/archwiki/tasks/main.yml | 2 +- roles/archwiki/templates/LocalSettings.php.j2 | 6 ++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/group_vars/all/vault_archwiki.yml b/group_vars/all/vault_archwiki.yml index 11e9ba071..da51e0bf5 100644 --- a/group_vars/all/vault_archwiki.yml +++ b/group_vars/all/vault_archwiki.yml @@ -1,14 +1,15 @@ $ANSIBLE_VAULT;1.1;AES256 -31383139386335663261303936393462396333666437656539333466376637616632303263313062 -3933643531333238356362313635363238633838336630360a373438386330333030366333343639 -39356531323330313161383961633530346137376334353333373038313538393236376533636636 -6238373865363634380a346265626332376533653765356436333364316563383161396132616535 -63376264643364623635666261363466616332633532633634653264626637303263623631323233 -34653339623230623662343230383430383862333133323830306462373232343961646666653732 -66333934613361383130643534656331623130633163653036353631303231633066333439656231 -66393130643162346133633635393965316432656130623563333437643161396131383130646563 -32346336636166653763663539633762656338373633386364646538373736353638366362303335 -64363030636439393031373937613438313665316632666262396535633166663362313764386435 -34666662643965633230663466636630343837336132616561303139343037393030613263353338 -64616439636538366237623033313234336133323636316166373737643364346437663834666339 -34653163313832636466393530343961343462356533653562353532666165376364 +31656438353639616130346136643066336661363232353037343666356436373836303063383432 +3531356566373935333832376262316236333061336564300a326461303934616435616166386462 +35656262316463306436326338306537663834623734623030323061353566636539636430653338 +3731323038386261660a646538303464313730353732373235353737666561326263656438326131 +64646266666265613235383838613836633762636165346465616163393261623232366365336634 +32636161363737326565336537383763306134386436383366663730666334383961656139663339 +31666238323338393231396662373662653030373131303738653035653363663632346463333533 +37333631633862373030316135656637653964373635633330636132386232383764373562313831 +30373362353032333439643539333263653961343437623237643662343933316139656366356236 +64333665303834303032656330326232336138316236626461613638643734303564323936646436 +64333231373033373139383132336135313363393935363534613235323361646334333238313430 +35666463653336643939393835666565353838356163623361353531343361353737356461373764 +63333331333961633831306438303835303964633938353164643135383331373633303136653163 +3164666561653332343065333830643039363339336433326238 diff --git a/roles/archwiki/tasks/main.yml b/roles/archwiki/tasks/main.yml index da99f77a0..111f18c6b 100644 --- a/roles/archwiki/tasks/main.yml +++ b/roles/archwiki/tasks/main.yml @@ -52,7 +52,7 @@ register: db_created - name: create archwiki db user - mysql_user: name={{ archwiki_db_user }} password={{ archwiki_db_password }} + mysql_user: name={{ archwiki_db_user }} password={{ vault_archwiki_db_password }} login_host="{{ archwiki_db_host }}" login_password="{{ vault_mariadb_users.root }}" priv="{{ archwiki_db }}.*:ALL" no_log: true diff --git a/roles/archwiki/templates/LocalSettings.php.j2 b/roles/archwiki/templates/LocalSettings.php.j2 index 3a798e625..c6987c5bd 100644 --- a/roles/archwiki/templates/LocalSettings.php.j2 +++ b/roles/archwiki/templates/LocalSettings.php.j2 @@ -18,13 +18,13 @@ if ( !defined( 'MEDIAWIKI' ) ) { ## Database settings $wgDBname = "{{ archwiki_db }}"; $wgDBuser = "{{ archwiki_db_user }}"; -$wgDBpassword = "{{ archwiki_db_password }}"; +$wgDBpassword = "{{ vault_archwiki_db_password }}"; -$wgSecretKey = "{{ archwiki_wg_secret_key }}"; +$wgSecretKey = "{{ vault_archwiki_wg_secret_key }}"; # Site upgrade key. Must be set to a string (default provided) to turn on the # web installer while LocalSettings.php is in place -$wgUpgradeKey = "{{ archwiki_wg_upgrade_key }}"; +$wgUpgradeKey = "{{ vault_archwiki_wg_upgrade_key }}"; # Enabled Extensions. Most extensions are enabled by including the base extension file here # but check specific extension documentation for more details -- GitLab