dotfiles/roles/gpg/tasks/main.yml
Matej Focko 0554e665c5
chore: move out user roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-12 21:23:02 +02:00

13 lines
392 B
YAML

---
- 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"