dataset/seed/host-systemd-machined/templates/nspawn
2022-07-01 22:10:33 +02:00

28 lines
771 B
Text

[Files]
Volatile=true
PrivateUsersChown=false
%set %%name = %%normalize_family(%%rougail_variable)
%set %%container = %%machined['machine_' + %%name]
%if %%container['srv_dir_' + %%name]
Bind=%%container['srv_dir_' + %%name]:/srv
%end if
Bind=%%container['journal_dir_' + %%name]:/var/log/journal/
BindReadOnly=%%container['config_dir_' + %%name]:/usr/local/lib
%set zones = %%container['zones_' + %%name]
%if %%zones
[Network]
Private=yes
VirtualEthernet=yes
%for %%idx, %%zone in %%enumerate(%%zones)
%if %%idx == 0
Bridge=%%zones[0]
%else
%set %%intname = "vc-" + %%str(%%idx) + %%rougail_variable
VirtualEthernetExtra=%%intname[:15]:host%%idx
%end if
%end for
%end if
%for %%port in %%container['incoming_ports_' + %%name]
Port=tcp:%%port:%%port
%end for