Generate also hosts and hostname files

master
LEdoian 2 years ago
parent 2fe2640e9e
commit 26f1299b59

@ -27,6 +27,8 @@ class Computer:
'qemu.sh', 'qemu.sh',
'interfaces', 'interfaces',
'bird.conf', 'bird.conf',
'hosts',
'hostname',
] ]
context = {'c': self} context = {'c': self}

@ -0,0 +1 @@
host-{{ c.name }}

@ -0,0 +1,5 @@
{% for br in c.bridges %}
172.23.{{ br.num }}.{{ c.num }} host-{{ c.name }}-net-{{ br.num }}
{% endfor %}
127.0.0.1 host-{{ c.name }} localhost localhost.localdomain
::1 host-{{ c.name }} localhost localhost.localdomain
Loading…
Cancel
Save