feat(user/gpg): create a GPG role
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
7505e307fb
commit
47f0553dd4
2 changed files with 17 additions and 0 deletions
|
@ -49,6 +49,10 @@
|
||||||
- role: user/ssh
|
- role: user/ssh
|
||||||
tags: ssh
|
tags: ssh
|
||||||
|
|
||||||
|
# Set up GPG
|
||||||
|
- role: user/gpg
|
||||||
|
tags: gpg
|
||||||
|
|
||||||
# Configure Alacritty terminal
|
# Configure Alacritty terminal
|
||||||
- role: user/terminals/alacritty
|
- role: user/terminals/alacritty
|
||||||
tags: alacritty
|
tags: alacritty
|
||||||
|
|
13
roles/user/gpg/tasks/main.yml
Normal file
13
roles/user/gpg/tasks/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
- name: Download the public GPG key
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://gitlab.com/{{ gitlab_login }}.gpg"
|
||||||
|
dest: /tmp/public.gpg
|
||||||
|
mode: 0600
|
||||||
|
|
||||||
|
- name: Import the public GPG key
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: gpg --import /tmp/public.gpg
|
||||||
|
register: gpg_import_result
|
||||||
|
failed_when: gpg_import_result.rc != 0
|
||||||
|
changed_when: "'imported: 1' in gpg_import_result.stdout"
|
Loading…
Reference in a new issue