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
This commit is contained in:
Jeremy Stanley 2019-03-14 13:28:35 +00:00
parent 0d3b5278d1
commit 1935596367
1 changed files with 1 additions and 1 deletions

View File

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