add task to re-encrypt files
This commit is contained in:
parent
cbbb8d5af3
commit
1b593f6e74
1 changed files with 20 additions and 0 deletions
20
tasks.py
20
tasks.py
|
@ -89,6 +89,26 @@ def _format_disks(host: DeployHost, devices: List[str]) -> None:
|
|||
host.run(f"mount -t ext4 /dev/md127 /mnt/boot")
|
||||
|
||||
|
||||
@task
|
||||
def update_sops_files(c):
|
||||
"""
|
||||
Update all sops yaml and json files according to .sops.yaml rules
|
||||
"""
|
||||
|
||||
c.run(
|
||||
"""
|
||||
find . \
|
||||
-not -path "./.github/*" \
|
||||
-not -path "./.mergify.yml" \
|
||||
-not -path "./_config.yml" \
|
||||
-type f \
|
||||
\( -iname '*.enc.json' -o -iname '*.yaml' \) \
|
||||
-print0 | \
|
||||
xargs -0 -n1 sops updatekeys --yes
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
@task
|
||||
def format_disks(c, hosts="", disks=""):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue