Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible/group_vars/all.example
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,6 @@ system_email_recipient:
# `enableMOTD` to the value `false` or uncomment the line afterwards ( default
# value is `true`).
# enableMOTD: false

# To enable proxy usage for APT, please uncomment the line below.
# ENABLE_PROXY_FOR_APT: "true"
6 changes: 4 additions & 2 deletions ansible/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
- name: Configure proxy for apt
when: http_proxy is defined
when:
- http_proxy is defined
- ENABLE_PROXY_FOR_APT == true
template: src=apt.proxy.conf.j2 dest=/etc/apt/apt.conf.d/01proxy

- name: Remove apt proxy configuration when no proxy is configured
when: http_proxy is not defined
when: ENABLE_PROXY_FOR_APT == false or http_proxy is not defined
file: dest=/etc/apt/apt.conf.d/01proxy state=absent

# Installing dnsmasq is a chicken/egg problem: the apt cache must be updated
Expand Down