diff --git a/tasks/main.yml b/tasks/main.yml index a77dbe5..2c29f48 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,21 +8,8 @@ - name: Install Docker. package: name={{ docker_package }} state={{ docker_package_state }} -- name: Docker | Configure Proxy - Ubuntu systemd - when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '16.04' - blockinfile: - path: /lib/systemd/system/docker.service - insertafter: '^\[Service\]$' - content: | - Environment="HTTP_PROXY={{ docker_http_proxy }}" - Environment="HTTPS_PROXY={{ docker_http_proxy }}" - Environment="NO_PROXY={{ docker_no_proxy }}" - -- name: Docker | Log into DockerHub - docker_login: - username: "{{ docker_hub_username }}" - password: "{{ docker_hub_password }}" - email: "{{ docker_hub_email }}" +- name: Docker | postinstall-Debian.yml + when: ansible_os_family == 'Debian' - name: Ensure Docker is started and enabled at boot. service: diff --git a/tasks/postinstall-Debian.yml b/tasks/postinstall-Debian.yml new file mode 100644 index 0000000..d2e99d6 --- /dev/null +++ b/tasks/postinstall-Debian.yml @@ -0,0 +1,10 @@ +--- +- name: Docker | Configure Proxy - Ubuntu systemd + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '16.04' + blockinfile: + path: /lib/systemd/system/docker.service + insertafter: '^\[Service\]$' + content: | + Environment="HTTP_PROXY={{ docker_http_proxy }}" + Environment="HTTPS_PROXY={{ docker_http_proxy }}" + Environment="NO_PROXY={{ docker_no_proxy }}"