-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible: Fix sync-secrets playbook to not clobber s3-keys alias symlinks
The psi/image-cache playbook installs the s3-keys/ symlink for the local S3 mirror on rhos-01-1. But sync-secrets clobbers that (as it always removes the entire existing secrets dir before re-syncing it). Fix this by factoring out the symlink creation into a nwe "local-s3-alias" role and calling it from both places.
- Loading branch information
1 parent
e7aaad9
commit 8dcb695
Showing
3 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
gather_facts: false | ||
roles: | ||
- install-secrets-dir | ||
- local-s3-alias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Create s3-keys alias | ||
file: | ||
src: self-hosted | ||
dest: "/var/lib/cockpit-secrets/tasks/s3-keys/{{ hostvars[groups['psi_s3'][0]].ansible_host }}" | ||
state: link | ||
owner: cockpituous | ||
group: cockpituous |