linux_introduction/assets/nspawn/full_bridged.yaml

44 lines
1.0 KiB
YAML
Raw Normal View History

2022-07-01 11:26:22 +02:00
{{- $architecture := or .architecture "amd64" -}}
{{- $suite := or .suite "bullseye" -}}
{{ $image := or .image (printf "debian_full_network-%s-%s.tgz" $suite $architecture) }}
architecture: {{ $architecture }}
actions:
- action: debootstrap
suite: {{ $suite }}
components:
- main
mirror: http://deb.debian.org/debian
# variant: minbase
- action: apt
recommends: false
packages:
- systemd-container
- adduser
- sudo
- htop
- vim-nox
- tmux
- action: run
description: enable essential systemd services
chroot: true
command: systemctl enable systemd-networkd systemd-resolved
- action: run
description: symlink resolv.conf
chroot: true
command: touch /etc/resolv.conf && rm /etc/resolv.conf && ln -s /var/run/systemd/resolve/resolv.conf /etc/resolv.conf
- action: run
description: Set hostname
chroot: true
command: echo debian-{{ $suite }}-{{ $architecture }} > /etc/hostname
- action: pack
file: {{ $image }}
compression: gz