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

This commit is contained in:
histausse 2021-06-29 11:26:28 +02:00
parent 560c50fe5b
commit 614fe79fa4
Signed by: histausse
GPG key ID: 67486F107F62E9E9
5 changed files with 18 additions and 0 deletions

View file

@ -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

View file

@ -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'] }}"

View file

@ -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'

View file

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