From 7df7b262427f3000c60288372439e37b32491ae3 Mon Sep 17 00:00:00 2001 From: Eli Zoller Date: Wed, 5 Aug 2020 06:07:28 -0700 Subject: [PATCH] adding the s3 access info to settings.php, part of https://github.com/asulibraries/islandora-repo/issues/84 --- aws_keys.yml | 46 ++++++++++++----------- roles/internal/asu-common/tasks/drush.yml | 12 ++++++ 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/aws_keys.yml b/aws_keys.yml index bfcdedbf..4bf0c487 100644 --- a/aws_keys.yml +++ b/aws_keys.yml @@ -1,22 +1,26 @@ $ANSIBLE_VAULT;1.1;AES256 -62626339343532666439616231356663663130633165636438353437633965613562316334363338 -3434636663663166363735383637383237336232663063390a356239306638613165363762623737 -33393138323234313036613734636366663138646630666434393636613439656537316465326535 -3439643236666138350a386630326565656632373734613162616237613034613230386532633636 -63343634616337353138336537366139313062613836373865373563353433396134646134316565 -61396263636237633631346230343361393738663832313664616465386434353964376534346466 -39653235326464383135383164346266643039383036353733363637656262313134613637333366 -62326537623033343465393539383030656562353261353837633835306265363137636639376232 -62346364303962656562343264633761393938346630313766336563356136353737616136663831 -30613633636535313465386535393166306534376332663263666164323734396239363566306431 -62393464333732663736393831623164396465356433663765643035643230323664666663613061 -39353037666337616131323736663434363230633462383438306432663363393465616238323230 -65656436616162346364343061613561636266626237353265346139623238616337346661393534 -37623130313239633838343664633261316265643361623966323131633230313039633364376362 -65613262373561653531363463633936313164643361613963353065383464633133316461623439 -62353730336336373435356465373132373364326537373336306331326536303532333530333265 -33323662303934636237356237386461653135366561613965303964313836616161646335646465 -34386564313265373339653030376139323634333565656630376639373336306434343037333533 -32323538303264333236323161373563303864356639313962666464643735616635303737653634 -61383965666662313138623334653261333231336363313232633162626435613237383233346432 -6330 +32323862633631396438343463613536636631626262623332373363626230613236306139343461 +6465636533336261643261626439626530653830306432310a613737633564333139393537653339 +61303432343761633362383864303836616266336466643036633735663064616265626665633064 +6361383836333066310a313530363330383033373461353837366331303839616237643336303161 +66363236373131656461636335396439326437303262343166613463613738386336316531653563 +61333639343738316262306530633933666533613337396161303931646634343762663830396166 +34383236323831373836643135636335333839666239646237376666363034373233353534383630 +63353566396666643930646333363239616438636361383937393963343035616332613766623038 +33653639643363626534653932396635633336363064323130336162306130303339336330663036 +33333066626563363531623363666630626233626436383266646664316364333739373265333938 +36343435653039323365613938363737383335343836663563323537633630336135653161386633 +66356564313230356634623630343035373063343638373666663237656539383438376234653136 +36666564303137396133626365356339303239366461316530623664306566303164383033376339 +34383563363164613361633264633365623434303832316439363466613238646364323865633136 +65623635333636646563376531646566613065313865366364366661363037383237303039333630 +36373236643330343139303166323839356164633631393962653462303235393332323930363664 +34343465393966623232663739646262666430656139663031363234376232366663373466643133 +38373438303366393631306538393431623961666135616330386234306337393862363866313466 +62626664613865393334623733653864343466363531343936386165316166636366373265326534 +63656561313265636635633039643866656332316234663765653538363431396262363932373534 +36636465373238356236373539353464623265363831303333656333373563663232613262633831 +62656261366239313530643233313737373461626630326533393361396234626261366266656165 +64653863376634623462303236383866323162306134333432653863643031306531356261373761 +32656135356436383366633933643335336665366133656666326231333437373838623930363463 +38313835663261313565336461326539346136363034303938356431623838646139 diff --git a/roles/internal/asu-common/tasks/drush.yml b/roles/internal/asu-common/tasks/drush.yml index b4d9deea..06f495a3 100644 --- a/roles/internal/asu-common/tasks/drush.yml +++ b/roles/internal/asu-common/tasks/drush.yml @@ -69,3 +69,15 @@ command: '{{ drush_path }} --root {{drupal_core_path}} config:set smtp.settings smtp_password {{aws_smtp_secret_key}}' args: chdir: /var/www/html/drupal/web + +- name: Edit Drupal's Setting file for aws s3 + when: inventory_dir is regex("stage|prod|aws") + lineinfile: + path: "/var/www/html/drupal/web/sites/default/settings.php" + line: "$settings['s3fs.access_key'] = '{{ aws_s3_access_key }}';" + +- name: Edit Drupal's Setting file for aws s3 + when: inventory_dir is regex("stage|prod|aws") + lineinfile: + path: "/var/www/html/drupal/web/sites/default/settings.php" + line: "$settings['s3fs.secret_key'] = '{{ aws_s3_secret_key }}';"