Make sure stuff exists when needed.

This commit is contained in:
Andreas B. Mundt 2021-11-16 20:39:23 +01:00 committed by Andreas B. Mundt
parent 85836e311e
commit 90d340a1d5
2 changed files with 17 additions and 1 deletions

View file

@ -56,6 +56,13 @@
###########
- name: install packages
apt:
name:
- systemd-container
- debootstrap
state: latest
- name: debootstrap minimal system
command:
cmd: >
@ -153,6 +160,11 @@
loop: "{{ containers[1:] }}"
notify: enable and restart containers
- name: prepare nspawn config directory
file:
path: /etc/systemd/nspawn
state: directory
- name: provide container configuration
template:
src: contcfg.nspawn.j2