move secrets from sops lookup plugin to sops vars plugin
Some checks failed
/ Ansible Lint (push) Failing after 1m54s
Some checks failed
/ Ansible Lint (push) Failing after 1m54s
This makes secret configuration and usage a good bit cleaner.
This commit is contained in:
parent
66e2e354b1
commit
7f1afef50d
42 changed files with 2449 additions and 2446 deletions
11
README.md
11
README.md
|
@ -17,12 +17,13 @@ ansible-galaxy install -r requirements.yml
|
|||
|
||||
## Secrets
|
||||
|
||||
Grundsätzlich sollten Secrets vermieden werden. (Also z.B.: Nutze SSH Keys statt Passwort.)
|
||||
Generally try to avoid secrets (e.g. use SSH keys instead of passwords).
|
||||
|
||||
Da Secrets aber durchaus doch gebraucht werden, verwenden wir [SOPS](https://github.com/getsops/sops), um Secrets verschlüsselt in diesem Repo zu speichern.
|
||||
SOPS verschlüsselt hier die Secrets nach den "creation rules", welche in der `sops.yaml` festgelegt sind.
|
||||
Grundsätzlich werden hier alle Secrets für alle GPG-Keys aller Mitglieder des Infra-Teams verschlüsselt.
|
||||
Das eigentliche Laden der Secrets durch Ansible geschieht mit Hilfe des `community.sops.sops` lookup Plugins, welches entsprechend den lokalen GPG-Key benutzt, um die Secrets zu entschlüsseln.
|
||||
Because secrets are nonetheless needed sometimes, we use [SOPS](https://github.com/getsops/sops) to securely store secrets in this repository.
|
||||
SOPS encrypts secrets according to "creation rules" which are defined in the `.sops.yaml`.
|
||||
Generally all secrets get encrypted for all GPG-keys of all members of the infrastructure team.
|
||||
Ansible then has access to the secrets with the help of the [`community.sops.sops` vars plugin](https://docs.ansible.com/ansible/latest/collections/community/sops/docsite/guide.html#working-with-encrypted-variables), which is configured in this repository.
|
||||
A local Ansible run then uses the locally available GPG-key to decrypt the secrets.
|
||||
|
||||
For a tutorial on how to set up secrets using SOPS for a new host, see [Setting Up Secrets Using SOPS for a New Host](./docs/setting_up_secrets_using_sops_for_a_new_host.md).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue