14 lines
392 B
YAML
14 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"
|