fix: use sops filestatus for discovering non-encrypted sops files

Fixes: https://github.com/onedr0p/cluster-template/issues/1539
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-09-27 14:31:19 -04:00
1 parent 81ce49599b
commit 9fcabba314
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ tasks:
file: "{{.ITEM}}" file: "{{.ITEM}}"
vars: vars:
file: file:
sh: find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \; sh: find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" | xargs -I {} sh -c 'sops filestatus {} | jq --exit-status ".encrypted == false" > /dev/null && echo {}'
.encrypt-file: .encrypt-file:
internal: true internal: true