tell apt to use the proxy on all machines connected to the vpn

networking
histausse 3 years ago
parent 560c50fe5b
commit 614fe79fa4
Signed by: histausse
GPG Key ID: 67486F107F62E9E9

@ -1,7 +1,12 @@
#!/usr/bin/env ansible-playbook
---
- hosts: vpn, !tests,
roles:
- client_apt_proxy
- hosts: all, !tests,
roles:
- base_config
- create_users
- ssh_totp

@ -5,3 +5,5 @@ apt_proxy_admin_mdp: "{{ vault_apt_proxy_admin_mdp }}"
apt_proxy_allowed_clients:
- "{{ intranet['ipv4'] }}/{{ intranet['netmaskv4'] }}"
apt_proxy_address: "{{ intranet['subnets']['physical']['subnets']['hindley']['ipv4'] }}"

@ -0,0 +1,8 @@
---
- name: Tell apt to use the proxy
template:
src: "00aptproxy.j2"
dest: "/etc/apt/apt.conf.d/00aptproxy"
owner: root
group: root
mode: '644'

@ -0,0 +1,3 @@
{{ ansible_managed | comment }}
Acquire::http::Proxy "http://{{ apt_proxy_address }}:{{ apt_proxy_port }}/";
Loading…
Cancel
Save