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

32 lines
863 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
2023-02-14 14:24:16 +01:00
%if %%container['tls_dir_' + %%name]
Bind=%%container['tls_dir_' + %%name]:/srv/tls
%end if
2022-03-08 19:42:28 +01:00
%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