tasks.py: switch to glob for update-sops-files

supported for updatekeys since 3.9.0
This commit is contained in:
zowoq 2024-07-10 14:33:56 +10:00
parent 6b273a3ec0
commit 1f272cc6de

View file

@ -63,16 +63,9 @@ def update_agenix_files(c: Any) -> None:
@task
def update_sops_files(c: Any) -> None:
"""
Update all sops yaml and json files according to .sops.yaml rules
Update all sops yaml files according to .sops.yaml rules
"""
c.run(
"""
find . \
-type f \
\( -iname '*.enc.json' -o -iname 'secrets.yaml' \) \
-exec sops updatekeys --yes {} \;
"""
)
c.run("shopt -s globstar && sops updatekeys --yes **/secrets.yaml")
@task