do not download gpg key once; fix file copying

master
paulfantom 7 years ago
parent 2135a1f2c9
commit 24189ea6cb

@ -8,7 +8,7 @@
- /etc/systemd/system
- name: ensure daemon config file is present
template:
copy:
content: |
{{ docker_json | to_nice_json(indent=2) }}
dest: /etc/docker/daemon.json
@ -21,9 +21,8 @@
when: docker_proxy
- name: create http-proxy.conf
template:
copy:
content: |
# {{ ansible_managed }}
[Service]
Environment="HTTP_PROXY={{ docker_http_proxy }}" "HTTPS_PROXY={{ docker_https_proxy }}" "NO_PROXY={{ docker_no_proxy }}"
dest: /etc/systemd/system/docker.service.d/http-proxy.conf

@ -19,17 +19,18 @@
- docker.io
- block:
- name: download GPG key
get_url:
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
dest: "/tmp/docker_{{ ansible_distribution | lower }}.gpg"
become: no
run_once: true
delegate_to: localhost
# - name: download GPG key
# get_url:
# url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
# dest: "/tmp/docker_{{ ansible_distribution | lower }}.gpg"
# become: no
# run_once: true
# delegate_to: localhost
- name: add GPG key
apt_key:
data: "{{ lookup('file', '/tmp/docker_{{ ansible_distribution | lower }}.gpg') }}"
#data: "{{ lookup('file', '/tmp/docker_{{ ansible_distribution | lower }}.gpg') }}"
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
state: present
- name: add docker repository | Debian

Loading…
Cancel
Save