Fix vault

This commit is contained in:
madereddy
2023-12-12 12:53:17 -05:00
parent e2bdb0aaf9
commit 8e745351ab
3 changed files with 32 additions and 28 deletions
+5 -1
View File
@@ -20,6 +20,9 @@ Simply clone this repository and follow the blog post below to get started
├── ansible.cfg ├── ansible.cfg
├── inventory.yml ├── inventory.yml
└── playbooks └── playbooks
├── vault
└── restic
└── restic.yml
├── docker_status.yml ├── docker_status.yml
├── docker_update_containers.yml ├── docker_update_containers.yml
├── deploy.yml ├── deploy.yml
@@ -30,6 +33,7 @@ Simply clone this repository and follow the blog post below to get started
├── os_family_discovery.yml ├── os_family_discovery.yml
├── ping_test.yml ├── ping_test.yml
└── update_upgrade.yml └── update_upgrade.yml
`````` ``````
#### ansible.cfg #### ansible.cfg
@@ -99,7 +103,7 @@ To clean up the build you can run `clean.yml` against the docker hosts.
If restoring your new machine. You can run playbook `redeploy` to restore from your OCI Backup which uses Restic to backup and restore. If restoring your new machine. You can run playbook `redeploy` to restore from your OCI Backup which uses Restic to backup and restore.
`ansible-playbook playbooks/redeploy.yml` `ansible-playbook playbooks/redeploy.yml --ask-vault-pass`
To clean up the build you can run `clean.yml` against the docker hosts. To clean up the build you can run `clean.yml` against the docker hosts.
+4 -4
View File
@@ -4,7 +4,7 @@
- include_vars: ~/vault/restic/restic.yml - include_vars: ~/vault/restic/restic.yml
- name: Create folder - name: Create folder
ansible.builtin.file: ansible.builtin.file:
path: ~/OCI_Build/docker path: ~/docker
state: directory state: directory
mode: '0755' mode: '0755'
@@ -15,13 +15,13 @@
export AWS_ACCESS_KEY_ID={{ AWS_ACCESS_KEY_ID }} export AWS_ACCESS_KEY_ID={{ AWS_ACCESS_KEY_ID }}
export AWS_SECRET_ACCESS_KEY={{ AWS_SECRET_ACCESS_KEY }} export AWS_SECRET_ACCESS_KEY={{ AWS_SECRET_ACCESS_KEY }}
export RESTIC_PASSWORD={{ RESTIC_PASSWORD }} export RESTIC_PASSWORD={{ RESTIC_PASSWORD }}
cd ~/OCI_Build/docker cd ~/docker
restic restore latest:/source/gcloud --target ./ restic restore latest:/source/gcloud --target ./
- name: Start container using Docker Compose - name: Start container using Docker Compose
ansible.builtin.command: ansible.builtin.command:
cmd: docker compose up -d cmd: docker compose up -d
chdir: ~/OCI_Build/docker chdir: ~/docker
ignore_errors: yes ignore_errors: yes
- name: Pause for 30 seconds to allow containers to stabilize - name: Pause for 30 seconds to allow containers to stabilize
@@ -31,6 +31,6 @@
- name: Check container status - name: Check container status
ansible.builtin.shell: docker compose ps -q | xargs -n1 docker container inspect --format '{{ "{{" }} .State.Running {{ "}}" }}' ansible.builtin.shell: docker compose ps -q | xargs -n1 docker container inspect --format '{{ "{{" }} .State.Running {{ "}}" }}'
args: args:
chdir: ~/OCI_Build/docker chdir: ~/docker
register: container_status register: container_status
ignore_errors: yes ignore_errors: yes
+19 -19
View File
@@ -1,20 +1,20 @@
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
38343838396565663330343563633136333631633232663434633166333231626137373163303865 33356631376263633164643136353066326535376563326635333464383139633432643263643266
3332393864373636373263303863306362366535303861370a623864663566343930653736356362 6661643138626635313637396633326663333761343963380a623831646561376465386466643963
30323463383762326366636461383232313464363838303531393530373364373830396430613931 64303262633730353130646366613462623937356164646133386231306531653263356236336231
6433353933343530370a656432633830386564353339626361646630353462626136386338663661 3931336139313537300a323638643366633762393933643461303265376361303762613438333633
39626238383434323165316133623633613734653032666666646664653137393662656564623661 62343032393330363231343566633731306539383137613138643338376630343738626631346263
64666565316264326636306234666261326164376537633335303738626139663737326135346566 64646239633863346365663933613432633763313462303636633332633635346137353639643233
62636162366564303930383435326635303161616231643535363733643635383565653033303230 62306239653933623561366466326331663363343833393535363836666137383763393965303334
37633732346634323139346437363833663138356637663034613065616331336161373464346636 39353161363131363633626539343361663039353665336332363030313565313261643262386661
34633339343236373331333932366432363563323136366533643636383837396264623839303538 31343732333363383732303534636533613865333031636134336436646366383931336637653736
62333165613761323861643037666636383233333536376236366565626631333861373030393264 61303264633434366664336636383632373430633161633930653863396162396565353066643031
39646165383863323737326165306262393732623362623235613735323833373365353135616665 37613235336138323735386439303866666234376466373061663737663739363431643732366239
32396166316330306132666230656130303030333530336666393732306339396136363864313235 63643132333139343939323031363431396531393834613437386132666433356131613632333739
63363532386134333239316634656636646364613964336130333635343030376665373466613436 31353866663637636332663739633936653564653337646437626166303139396564323636363734
33633561336235363233386263303839396439326639383562616362613165363333323335313863 63356338356336323461626335373839303232363531316665396562316230306238633138326131
62323834376566636336363331613930636436373836633735623433333630376531333561306630 38633131646464343734643236396565326537323366333863356231323961326135373538376662
35353031636561343537626337613937316662653130386433346363643336343366396566376365 39623435666133626466333936346633366132663565366265393137386437623333333934326534
66656439643535633537656137306262663664666533633466373236663437373438333638356335 33613033643339313432353432303437666633343261636638613938333330666363613566313065
33346332333161326136303137386633343265623035623862613436663831383539633230333335 39333963653565383461336137393036386439336134346231333563323464336430356666646361
663963353334326436366239643336363530 626630343137363939306237616131633863