Compare commits
2 commits
4afe9a8ff7
...
614ee9c462
| Author | SHA1 | Date | |
|---|---|---|---|
| 614ee9c462 | |||
| b492472179 |
7 changed files with 21 additions and 11 deletions
|
|
@ -2,19 +2,29 @@
|
|||
|
||||
Because we're using the `community.sops.sops` vars plugin, the SOPS-encrypted secrets get stored in the inventory.
|
||||
|
||||
1. Add a new creation rule for the hosts `host_vars` file in the sops config at `.sops.yaml`.
|
||||
It should probably hold all admin keys.
|
||||
1. Create a new age key for Ansible pull on the host.
|
||||
```
|
||||
age-keygen
|
||||
```
|
||||
Then add an entry to `keys.hosts.chaosknoten.age`
|
||||
2. Add a new creation rule for the hosts `host_vars` file in the sops config at `.sops.yaml`.
|
||||
It should probably hold all admin keys plus the host entry.
|
||||
You can use existing creation rules as a reference.
|
||||
2. Create a SOPS secrets file in the `host_vars` subdirectory of the relevant inventory.
|
||||
3. Create a SOPS secrets file in the `host_vars` subdirectory of the relevant inventory.
|
||||
The name of the file should be in the format `[HOSTNAME].sops.yaml` to get picked up by the vars plugin and to match the previously created creation rule.
|
||||
This can be accomplished with a command similar to this:
|
||||
```
|
||||
sops inventories/[chaosknoten|z9]/host_vars/[HOSTNAME].secrets.yaml
|
||||
```
|
||||
3. With the editor now open, add the secrets you want to store.
|
||||
4. With the editor now open, add the secrets you want to store.
|
||||
Because we're using the `community.sops.sops` vars plugin, the stored secrets will be exposed as Ansible variables.
|
||||
Also note that SOPS only encrypts the values, not the keys.
|
||||
When now creating entries, try to adhere to the following variable naming convention:
|
||||
- Make sure to put the prive age key in here under `ansible_pull__age_private_key`.
|
||||
- Prefix variable names with `secret__`, if they are intended to be used in a template file or similar. (e.g. `secret__netbox_secret_key: secret_value`)
|
||||
- Otherwise, if the variable is directly consumed by a role or similar, directly set the variable. (e.g. `netbox__db_password: secret_value`)
|
||||
4. Now that the secrets are stored, they are exposed as variables and can simply be used like any other variable.
|
||||
5. Now that the secrets are stored, they are exposed as variables and can simply be used like any other variable.
|
||||
|
||||
## GPG Keys
|
||||
|
||||
In order to edit encrypted files, you need all the GPG public keys imported into your GPG Keychain. You should be able to find the necessary public keys in https://git.hamburg.ccc.de/CCCHH/password-store.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud
|
||||
nextcloud__version: 32
|
||||
# renovate: datasource=docker depName=docker.io/library/postgres
|
||||
nextcloud__postgres_version: 15.15
|
||||
nextcloud__postgres_version: 18.1
|
||||
nextcloud__fqdn: cloud.hamburg.ccc.de
|
||||
nextcloud__data_dir: /data/nextcloud
|
||||
nextcloud__extra_configuration: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/cloud/nextcloud/extra_configuration.config.php.j2') }}"
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ services:
|
|||
- "8080:8080"
|
||||
|
||||
db:
|
||||
image: docker.io/library/postgres:15.15
|
||||
image: docker.io/library/postgres:18.1
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- keycloak
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ services:
|
|||
- POSTGRES_DB=mailmandb
|
||||
- POSTGRES_USER=mailman
|
||||
- POSTGRES_PASSWORD=wvQjbMRnwFuxGEPz
|
||||
image: docker.io/library/postgres:12-alpine
|
||||
image: docker.io/library/postgres:18-alpine
|
||||
volumes:
|
||||
- /opt/mailman/database:/var/lib/postgresql/data
|
||||
networks:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
services:
|
||||
database:
|
||||
image: docker.io/library/postgres:15-alpine
|
||||
image: docker.io/library/postgres:18-alpine
|
||||
environment:
|
||||
- "POSTGRES_USER=hedgedoc"
|
||||
- "POSTGRES_PASSWORD={{ secret__hedgedoc_db_password }}"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
services:
|
||||
database:
|
||||
image: docker.io/library/postgres:15-alpine
|
||||
image: docker.io/library/postgres:18-alpine
|
||||
environment:
|
||||
- "POSTGRES_USER=pretalx"
|
||||
- "POSTGRES_PASSWORD={{ secret__pretalx_db_password }}"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
services:
|
||||
database:
|
||||
image: docker.io/library/postgres:15-alpine
|
||||
image: docker.io/library/postgres:18-alpine
|
||||
environment:
|
||||
- "POSTGRES_USER=pretix"
|
||||
- "POSTGRES_PASSWORD={{ secret__pretix_db_password }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue