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

29 lines
771 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
2022-04-28 21:48:16 +02:00
Bind=%%container['journal_dir_' + %%name]:/var/log/journal/
2022-03-08 19:42:28 +01:00
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
2022-06-29 11:44:01 +02:00
%for %%port in %%container['incoming_ports_' + %%name]
2022-03-08 19:42:28 +01:00
Port=tcp:%%port:%%port
%end for