mirror of
				https://github.com/geerlingguy/ansible-role-docker.git
				synced 2025-11-01 01:19:32 +01:00 
			
		
		
		
	removed login, to be moved to specific application. created a postistall machine specific for proxy conf
This commit is contained in:
		
							parent
							
								
									77b2a56e90
								
							
						
					
					
						commit
						22f4c1b22d
					
				@ -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:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								tasks/postinstall-Debian.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tasks/postinstall-Debian.yml
									
									
									
									
									
										Normal 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 }}"
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user