mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Use ansible_facts.xxx instead of ansible_xxx. (#1237)
This commit is contained in:
@@ -21,12 +21,12 @@
|
||||
block:
|
||||
- name: Add gpg key
|
||||
ansible.builtin.get_url:
|
||||
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
|
||||
url: "https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}/gpg"
|
||||
dest: /etc/apt/keyrings/docker.asc
|
||||
|
||||
- name: Add Docker repo
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb [arch={{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
|
||||
repo: deb [arch={{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/{{ ansible_facts.distribution | lower }} {{ ansible_facts.distribution_release }} stable
|
||||
state: present
|
||||
|
||||
- when:
|
||||
@@ -35,11 +35,11 @@
|
||||
name: Add Docker repo on Ubuntu 20 or before, or Debian 11 or before
|
||||
block:
|
||||
- name: Add gpg key
|
||||
ansible.builtin.shell: curl -fsSL https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg >key && apt-key add key # noqa: command-instead-of-module
|
||||
ansible.builtin.shell: curl -fsSL https://download.docker.com/linux/{{ ansible_facts.distribution | lower }}/gpg >key && apt-key add key # noqa: command-instead-of-module
|
||||
|
||||
- name: Add Docker repo
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb [arch={{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
|
||||
repo: deb [arch={{ 'arm64' if ansible_facts.architecture == 'aarch64' else 'amd64' }}] https://download.docker.com/linux/{{ ansible_facts.distribution | lower }} {{ ansible_facts.distribution_release }} stable
|
||||
state: present
|
||||
|
||||
- block:
|
||||
|
||||
Reference in New Issue
Block a user