removed login, to be moved to specific application. created a postistall machine specific for proxy conf

This commit is contained in:
Denis Pitzalis 2018-01-23 17:32:14 +01:00
parent 77b2a56e90
commit 22f4c1b22d
2 changed files with 12 additions and 15 deletions

View File

@ -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:

View File

@ -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 }}"