From 0ed4230794add0c322c00e96b54328b8ae1196b0 Mon Sep 17 00:00:00 2001 From: "Andreas B. Mundt" Date: Sat, 20 Nov 2021 14:38:22 +0100 Subject: [PATCH] Split container package list. --- edubox.yml | 16 +++++++++++++++- roles/educontainer/defaults/main.yml | 17 +++-------------- roles/educontainer/tasks/main.yml | 2 +- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/edubox.yml b/edubox.yml index 5bee3f2..47eb7c9 100644 --- a/edubox.yml +++ b/edubox.yml @@ -3,7 +3,7 @@ ## for educational use on a host, for example to learn ansible! ## All containers use an apt cache on the host system and forward port ## 22 (ssh), 80 (http) and 443 (https) to ports >= 10000, 10100 and 10200 -## respectively. A user 'ansible' in the 'sudo' group is prepared, +## respectively. A user 'ansi' in the 'sudo' group is prepared, ## either with empty password or an initial password to be set below. ## ## Modifications of the initial containers are kept in an overlay @@ -31,6 +31,20 @@ contpwd: "" ## Adjust the number of containers here: containers: "{{ range(0, 9 + 1) | list }}" + ## Additional packages to be installed in the container: + cont_packages_extra: + - bind9-dnsutils + - file + - locales + - xz-utils + - lsof + - wget + - bind9-host + - libc-l10n + - traceroute + - bzip2 + - netcat-traditional + - telnet pre_tasks: - name: install apt-cacher-ng diff --git a/roles/educontainer/defaults/main.yml b/roles/educontainer/defaults/main.yml index 34b95b2..b58b8b7 100644 --- a/roles/educontainer/defaults/main.yml +++ b/roles/educontainer/defaults/main.yml @@ -5,20 +5,9 @@ cont_packages: - sudo - python3 - auto-apt-proxy - - bash-completion - - bind9-dnsutils - - file - - locales - - xz-utils - - lsof - - wget - - bind9-host - - man-db - ca-certificates + - man-db - manpages - - libc-l10n - - traceroute - - bzip2 - - netcat-traditional - - telnet + +cont_packages_extra: [] diff --git a/roles/educontainer/tasks/main.yml b/roles/educontainer/tasks/main.yml index b175ff2..2d051c8 100644 --- a/roles/educontainer/tasks/main.yml +++ b/roles/educontainer/tasks/main.yml @@ -62,7 +62,7 @@ command: cmd: > debootstrap - --include={{ cont_packages | join(',') }} + --include={{ cont_packages | union(cont_packages_extra) | join(',') }} --components=main,contrib,non-free stable {{ contname }}00 http://deb.debian.org/debian args: