Merge pull request #1 from DeBankDeFi/proxy_env

add proxy_env for docker installation
This commit is contained in:
barryz 2021-09-01 17:41:01 +08:00 committed by GitHub
commit 9e006fffb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -36,3 +36,8 @@ docker_users: []
# Docker daemon options as a dict
docker_daemon_options: {}
# proxy env, if defined, env vars https_proxy and http_proxy will be injected.
proxy_env:
http_proxy:
https_proxy:

View File

@ -18,6 +18,7 @@
url: "{{ docker_compose_url }}"
dest: "{{ docker_compose_path }}"
mode: 0755
environment: "{{ proxy_env }}"
when: >
docker_compose_current_version.stdout is not defined
or docker_compose_version not in docker_compose_current_version.stdout

View File

@ -11,6 +11,7 @@
state: "{{ docker_package_state }}"
notify: restart docker
ignore_errors: "{{ ansible_check_mode }}"
environment: "{{ proxy_env }}"
- name: Ensure /etc/docker/ directory exists.
file: