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:
parent
ed4bdbacd3
commit
7491699409
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue