Compare commits
2 commits
48ad1157c6
...
4e0ac9fdc3
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e0ac9fdc3 | |||
| b492472179 |
5 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.
|
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`.
|
1. Create a new age key for Ansible pull on the host.
|
||||||
It should probably hold all admin keys.
|
```
|
||||||
|
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.
|
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.
|
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:
|
This can be accomplished with a command similar to this:
|
||||||
```
|
```
|
||||||
sops inventories/[chaosknoten|z9]/host_vars/[HOSTNAME].secrets.yaml
|
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.
|
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.
|
Also note that SOPS only encrypts the values, not the keys.
|
||||||
When now creating entries, try to adhere to the following variable naming convention:
|
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`)
|
- 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`)
|
- 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,5 +1,5 @@
|
||||||
# renovate: datasource=github-releases depName=netbox packageName=netbox-community/netbox
|
# renovate: datasource=github-releases depName=netbox packageName=netbox-community/netbox
|
||||||
netbox__version: "v4.5.0"
|
netbox__version: "v4.5.1"
|
||||||
netbox__config: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/netbox/netbox/configuration.py.j2') }}"
|
netbox__config: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/netbox/netbox/configuration.py.j2') }}"
|
||||||
netbox__custom_pipeline_oidc_group_and_role_mapping: true
|
netbox__custom_pipeline_oidc_group_and_role_mapping: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ services:
|
||||||
- prom_data:/prometheus
|
- prom_data:/prometheus
|
||||||
|
|
||||||
alertmanager:
|
alertmanager:
|
||||||
image: docker.io/prom/alertmanager:v0.30.0
|
image: docker.io/prom/alertmanager:v0.30.1
|
||||||
container_name: alertmanager
|
container_name: alertmanager
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/alertmanager/alertmanager.yaml'
|
- '--config.file=/etc/alertmanager/alertmanager.yaml'
|
||||||
|
|
@ -59,7 +59,7 @@ services:
|
||||||
- /dev/null:/etc/prometheus/pve.yml
|
- /dev/null:/etc/prometheus/pve.yml
|
||||||
|
|
||||||
loki:
|
loki:
|
||||||
image: docker.io/grafana/loki:3.6.3
|
image: docker.io/grafana/loki:3.6.4
|
||||||
container_name: loki
|
container_name: loki
|
||||||
ports:
|
ports:
|
||||||
- 13100:3100
|
- 13100:3100
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
ntfy:
|
ntfy:
|
||||||
image: docker.io/binwiederhier/ntfy:v2.15.0
|
image: docker.io/binwiederhier/ntfy:v2.16.0
|
||||||
container_name: ntfy
|
container_name: ntfy
|
||||||
command:
|
command:
|
||||||
- serve
|
- serve
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ services:
|
||||||
- pretalx_net
|
- pretalx_net
|
||||||
|
|
||||||
pretalx:
|
pretalx:
|
||||||
image: docker.io/pretalx/standalone:v2025.1.0
|
image: docker.io/pretalx/standalone:v2025.2.2
|
||||||
entrypoint: gunicorn
|
entrypoint: gunicorn
|
||||||
command:
|
command:
|
||||||
- "pretalx.wsgi"
|
- "pretalx.wsgi"
|
||||||
|
|
@ -78,7 +78,7 @@ services:
|
||||||
- pretalx_net
|
- pretalx_net
|
||||||
|
|
||||||
celery:
|
celery:
|
||||||
image: docker.io/pretalx/standalone:v2025.1.0
|
image: docker.io/pretalx/standalone:v2025.2.2
|
||||||
command:
|
command:
|
||||||
- taskworker
|
- taskworker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue