Turn shell task into smaller Ansible tasks
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ef9d3d0beb
commit
045506a9ab
@ -11,14 +11,21 @@
|
||||
- gnupg
|
||||
- lsb-release
|
||||
|
||||
- name: Add Docker GPG key # noqa command-instead-of-module risky-shell-pipe
|
||||
- name: Retrieve Docker GPG key
|
||||
ansible.builtin.uri:
|
||||
url: https://download.docker.com/linux/debian/gpg
|
||||
return_content: true
|
||||
register: docker_gpg_key
|
||||
|
||||
- name: Install Docker GPG key
|
||||
become: true
|
||||
ansible.builtin.shell: "curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg"
|
||||
ansible.builtin.command: "gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg"
|
||||
args:
|
||||
stdin: "{{ docker_gpg_key.content }}"
|
||||
creates: /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
|
||||
- name: Retrieve dpkg architecture # noqa command-instead-of-shell
|
||||
ansible.builtin.shell: dpkg --print-architecture
|
||||
- name: Retrieve dpkg architecture
|
||||
ansible.builtin.command: dpkg --print-architecture
|
||||
register: dpkg_architecture
|
||||
changed_when: false
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user