creating groups for sops.yaml (#25)

* creating groups for sops.yaml
I used yaml anchors
https://en.wikipedia.org/wiki/YAML#Advanced_components
I also ran the redhat YAML formater

* fixed typo
This commit is contained in:
Richie Cahill 2024-01-07 16:57:42 -05:00 committed by GitHub
parent 4abf1a806e
commit 6e239a8e90

View File

@ -10,6 +10,16 @@ keys:
- &photon age13aqs2mx66dmnyd74sygnwavufv6a4pwnvcqj4ud4l94jk0tjgu6ss57slw
- &jeeves-jr age1lffr5f5nz0nrenv3ekgy27e8sztsx4gfp3hfymkz77mqaa5a4gts0ncrrh
admins: &admins
- *admin_alice
- *admin_dennis
- *admin_richie
servers: &servers
- *palatine-hill
- *photon
- *jeeves-jr
# add new users by executing: sops users/<user>/secrets.yaml
# then have someone already in the repo run the below
#
@ -17,28 +27,19 @@ keys:
creation_rules:
- path_regex: systems/jeeves-jr/secrets\.yaml$
key_groups:
- pgp:
- *admin_alice
- *admin_dennis
- *admin_richie
- pgp: *admins
age:
- *jeeves-jr
- path_regex: systems/palatine-hill/secrets\.yaml$
key_groups:
- pgp:
- *admin_alice
- *admin_dennis
- *admin_richie
- pgp: *admins
age:
- *palatine-hill
- path_regex: systems/photon/secrets\.yaml$
key_groups:
- pgp:
- *admin_alice
- *admin_dennis
- *admin_richie
- pgp: *admins
age:
- *photon
@ -46,25 +47,14 @@ creation_rules:
key_groups:
- pgp:
- *admin_alice
age:
- *jeeves-jr
- *palatine-hill
- *photon
age: *servers
- path_regex: users/dennis/secrets\.yaml$
key_groups:
- pgp:
- *admin_dennis
age:
- *jeeves-jr
- *palatine-hill
- *photon
age: *servers
- path_regex: users/richie/secrets\.yaml$
key_groups:
- pgp:
- *admin_richie
age:
- *jeeves-jr
- *palatine-hill
- *photon
age: *servers