Files
kayobe/ansible/roles/apt/tasks/main.yml
Skylar Kelty f24b3176eb Add support for apt proxy setting
Add support for configuring apt's proxy setting on Ubuntu hosts.

Change-Id: Iea1daff70fca5cf49f4e7f44af71a900678bb5c9
Story: 2009035
Task: 42782
2021-09-21 10:39:38 +02:00

18 lines
501 B
YAML

---
- name: Configure apt proxy
template:
src: "01proxy.j2"
dest: /etc/apt/apt.conf.d/01proxy
owner: root
group: root
mode: 0664
become: true
when: apt_proxy_http | default('', true) | length > 0 or apt_proxy_https | default('', true) | length > 0
- name: Remove old apt proxy config
file:
path: /etc/apt/apt.conf.d/01proxy
state: absent
become: true
when: apt_proxy_http | default('', true) | length == 0 and apt_proxy_https | default('', true) | length == 0