|
|
@ -51,4 +51,22 @@ |
|
|
|
when: ansible_os_family == 'RedHat' |
|
|
|
when: ansible_os_family == 'RedHat' |
|
|
|
tags: proxy |
|
|
|
tags: proxy |
|
|
|
|
|
|
|
|
|
|
|
# TODO: equivalent for apt |
|
|
|
- name: Config proxy for apt |
|
|
|
|
|
|
|
copy: |
|
|
|
|
|
|
|
content: | |
|
|
|
|
|
|
|
Acquire::http::Proxy "{{ system_proxy }}"; |
|
|
|
|
|
|
|
Acquire::https::Proxy "{{ system_proxy }}"; |
|
|
|
|
|
|
|
dest: /etc/apt/apt.conf.d/10proxy |
|
|
|
|
|
|
|
when: |
|
|
|
|
|
|
|
- ansible_os_family == 'Debian' |
|
|
|
|
|
|
|
- system_proxy is defined |
|
|
|
|
|
|
|
- system_proxy != '' |
|
|
|
|
|
|
|
tags: proxy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Remove proxy from apt config |
|
|
|
|
|
|
|
file: path=/etc/apt/apt.conf.d/10proxy state=absent |
|
|
|
|
|
|
|
when: |
|
|
|
|
|
|
|
- ansible_os_family == 'Debian' |
|
|
|
|
|
|
|
- system_proxy is not defined or system_proxy == '' |
|
|
|
|
|
|
|
tags: proxy |
|
|
|
|
|
|
|
|
|
|
|