create network role and include it into base (only openbsd does something)
This commit is contained in:
parent
ba0c70532f
commit
dd19c94511
9 changed files with 101 additions and 0 deletions
17
roles/network/templates/hostname.if.j2
Normal file
17
roles/network/templates/hostname.if.j2
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% if item.proto is not defined or item.proto == 'static' %}
|
||||
inet {{ item.ipaddr }} {{ item.netmask }}
|
||||
{% elif item.proto == 'dhcp' %}
|
||||
dhcp
|
||||
{% elif item.proto == 'none' %}
|
||||
up
|
||||
{% endif %}
|
||||
{% if item.ip6addr is defined %}
|
||||
{% if item.ip6addr == 'auto' %}
|
||||
inet6 autoconfig
|
||||
{% elif ip6addr != 'none' %}
|
||||
inet6 alias {{ item.ip6addr }} {{ item.ip6netmask }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if item.postcmd is defined %}
|
||||
{{ postcmd }}
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue