Don't override GNUPGHOME

A user may have set GNUPGHOME to a location other than
$HOME/.gnupg and if they have, we should let gpg use that location.
gpg already defaults to $HOME/.gnupg if GNUPGHOME isn't set.
This commit is contained in:
Charlie O'Keefe 2019-02-13 21:38:14 -07:00
parent ed4bdbacd3
commit 7491699409
1 changed files with 0 additions and 4 deletions

View File

@ -4,16 +4,12 @@
become: no
ignore_errors: true
register: gpg_list_keys_result
environment:
GNUPGHOME: "{{ lookup('env', 'HOME') }}/.gnupg"
- name: Export the GPG private key from the local keyring.
local_action: "command gpg2 --armor --export-secret-key {{ gpg_key_id }}"
become: no
register: gpg_private_key
changed_when: false
environment:
GNUPGHOME: "{{ lookup('env', 'HOME') }}/.gnupg"
when: gpg_list_keys_result.stdout != ''
no_log: True