Browse Source

Support ~/.gnupg subdirs in remove-gpgkey role

Newer versions of GNU Privacy Guard place some files in a
private-keys-v1.d subdirectory of ~/.gnupg so calling shred on them
needs extra care (shred has no recursive option). Instead of relying
on globbing, use find to filter to a list of files under that tree
so that shredding them will still work.

Change-Id: I69ed78b1b6d642d71b5e426c9ed254b3e5097ae3
master
Jeremy Stanley 2 months ago
parent
commit
1935596367
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      roles/remove-gpgkey/tasks/main.yaml

+ 1
- 1
roles/remove-gpgkey/tasks/main.yaml View File

@@ -1,2 +1,2 @@
1 1
 - name: Remove GPG key
2
-  command: "sh -c 'shred -u ~/.gnupg/*'"
2
+  shell: 'find ~/.gnupg/ -type f -exec shred -u {} \\;'

Loading…
Cancel
Save