dataset/seed/applicationservice/2022.03.08/host-systemd-machined/templates/nspawn

28 lines
711 B
Text
Raw Normal View History

2022-03-08 19:42:28 +01:00
[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
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['external_ports_' + %%name]
Port=tcp:%%port:%%port
%end for