Add sops taskfile
This commit is contained in:
parent
0a1255b438
commit
c9051283dd
2 changed files with 32 additions and 0 deletions
18
.taskfiles/sops/Taskfile.yaml
Normal file
18
.taskfiles/sops/Taskfile.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
re-encrypt:
|
||||
desc: Decrypt and re-encrypt all sops secrets
|
||||
silent: true
|
||||
dir: "{{.USER_WORKING_DIR}}"
|
||||
vars:
|
||||
SECRET_FILES:
|
||||
sh: find . -type f -name '*.sops.yaml' ! -name ".sops.yaml"
|
||||
cmds:
|
||||
- for: { var: SECRET_FILES }
|
||||
cmd: |
|
||||
echo "Re-encrypting {{ .ITEM }}"
|
||||
sops --decrypt --in-place "{{ .ITEM }}"
|
||||
sops --encrypt --in-place "{{ .ITEM }}"
|
14
Taskfile.yaml
Normal file
14
Taskfile.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
# go-task runner file - rest of config in .taskfiles/**.*.yaml
|
||||
version: "3"
|
||||
|
||||
includes:
|
||||
sops:
|
||||
taskfile: ".taskfiles/sops"
|
||||
dir: .taskfiles/sops
|
||||
|
||||
tasks:
|
||||
default:
|
||||
silent: true
|
||||
cmds:
|
||||
- task -l
|
Loading…
Reference in a new issue