Continue eliminating hardcoded apt-proxy.

This commit is contained in:
Andreas B. Mundt 2022-06-26 12:59:09 +02:00 committed by Andreas B. Mundt
parent 280f42ae0b
commit 93f9565c55
3 changed files with 5 additions and 11 deletions

View file

@ -51,15 +51,11 @@
pre_tasks:
- name: install apt-cacher-ng
apt:
name: apt-cacher-ng
name:
- apt-cacher-ng
- auto-apt-proxy
state: latest # noqa package-latest
- name: enable apt-cacher-ng
lineinfile:
path: /etc/apt/apt.conf.d/30proxy
line: 'Acquire::http::Proxy "http://localhost:3142/";'
create: true
- name: enable and start systemd-networkd on the host
systemd:
name: systemd-networkd

View file

@ -1 +0,0 @@
Acquire::http::Proxy "http://localhost:3142";

View file

@ -5,6 +5,7 @@
name:
- systemd-container
- debootstrap
- auto-apt-proxy
state: latest # noqa package-latest
- name: prepare machine directory
@ -16,15 +17,13 @@
- name: debootstrap base system
command:
cmd: >
debootstrap
auto-apt-proxy debootstrap
--include={{ cont_packages | union(cont_packages_extra) | join(',') }}
--components=main,contrib,non-free stable
{{ contname }}00 http://deb.debian.org/debian
args:
chdir: /var/lib/machines/
creates: /var/lib/machines/{{ contname }}00
environment:
http_proxy: "{{ '' if run_in_installer|default(false) else 'http://localhost:3142' }}"
notify: enable and restart containers
- name: provide complete apt sources