Generate also hosts and hostname files

master
LEdoian 3 years ago
parent 2fe2640e9e
commit 26f1299b59

@ -27,6 +27,8 @@ class Computer:
'qemu.sh',
'interfaces',
'bird.conf',
'hosts',
'hostname',
]
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