[interfaces] Alias ansible facts
parent
9e263ee31b
commit
c108c01933
|
@ -1,11 +1,12 @@
|
|||
{{ ansible_header | comment }}
|
||||
|
||||
{% set srv = hostvars[inventory_hostname]['ansible_' + srv_iface.stdout] %}
|
||||
allow-hotplug {{ srv_iface.stdout }}
|
||||
iface {{ srv_iface.stdout }} inet static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv4.address }}
|
||||
network {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv4.network }}
|
||||
netmask {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv4.netmask }}
|
||||
broadcast {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv4.broadcast }}
|
||||
address {{ srv.ipv4.address }}
|
||||
network {{ srv.ipv4.network }}
|
||||
netmask {{ srv.ipv4.netmask }}
|
||||
broadcast {{ srv.ipv4.broadcast }}
|
||||
gateway {{ srv_gateway }}
|
||||
mtu 1496
|
||||
dns-nameservers {{ srv_dns }}
|
||||
|
@ -22,7 +23,7 @@ iface {{ srv_iface.stdout }} inet static
|
|||
{% endif %}
|
||||
|
||||
iface {{ srv_iface.stdout }} inet6 static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + srv_iface.stdout].ipv6[0].prefix }}
|
||||
address {{ srv.ipv6[0].address }}/{{ srv.ipv6[0].prefix }}
|
||||
autoconf 1
|
||||
accept_ra 2
|
||||
up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{{ ansible_header | comment }}
|
||||
|
||||
{% set ens = hostvars[inventory_hostname]['ansible_' + ens_iface.stdout] %}
|
||||
allow-hotplug {{ ens_iface.stdout }}
|
||||
iface {{ ens_iface.stdout }} inet static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv4.address }}
|
||||
network {{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv4.network }}
|
||||
netmask {{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv4.netmask }}
|
||||
broadcast {{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv4.broadcast }}
|
||||
address {{ ens.ipv4.address }}
|
||||
network {{ ens.ipv4.network }}
|
||||
netmask {{ ens.ipv4.netmask }}
|
||||
broadcast {{ ens.ipv4.broadcast }}
|
||||
gateway {{ ens_gateway }}
|
||||
mtu 1496
|
||||
dns-nameservers {{ ens_dns }}
|
||||
|
@ -22,7 +23,7 @@ iface {{ ens_iface.stdout }} inet static
|
|||
{% endif %}
|
||||
|
||||
iface {{ ens_iface.stdout }} inet6 static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + ens_iface.stdout].ipv6[0].prefix }}
|
||||
address {{ ens.ipv6[0].address }}/{{ ens.ipv6[0].prefix }}
|
||||
autoconf 1
|
||||
accept_ra 2
|
||||
up /sbin/sysctl net/ipv6/conf/$IFACE/accept_ra_defrtr=1
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{{ ansible_header | comment }}
|
||||
|
||||
{% set adm = hostvars[inventory_hostname]['ansible_' + adm_iface.stdout] %}
|
||||
allow-hotplug {{ adm_iface.stdout }}
|
||||
iface {{ adm_iface.stdout }} inet static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv4.address }}
|
||||
network {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv4.network }}
|
||||
netmask {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv4.netmask }}
|
||||
broadcast {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv4.broadcast }}
|
||||
address {{ adm.ipv4.address }}
|
||||
network {{ adm.ipv4.network }}
|
||||
netmask {{ adm.ipv4.netmask }}
|
||||
broadcast {{ adm.ipv4.broadcast }}
|
||||
mtu 1496
|
||||
dns-nameservers {{ adm_dns }}
|
||||
dns-search adm.crans.org
|
||||
|
@ -21,7 +22,7 @@ iface {{ adm_iface.stdout }} inet static
|
|||
{% endif %}
|
||||
|
||||
iface {{ adm_iface.stdout }} inet6 static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + adm_iface.stdout].ipv6[0].prefix }}
|
||||
address {{ adm.ipv6[0].address }}/{{ adm.ipv6[0].prefix }}
|
||||
{% if 'interfaces' in ansible_local %}
|
||||
{% if 'sup_if_6' in ansible_local.interfaces %}
|
||||
{% if adm_iface.stdout in ansible_local.interfaces.sup_if_6 %}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{{ ansible_header | comment }}
|
||||
|
||||
{% set fil = hostvars[inventory_hostname]['ansible_' + fil_iface.stdout] %}
|
||||
allow-hotplug {{ fil_iface.stdout }}
|
||||
iface {{ fil_iface.stdout }} inet static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv4.address }}
|
||||
network {{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv4.network }}
|
||||
netmask {{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv4.netmask }}
|
||||
broadcast {{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv4.broadcast }}
|
||||
address {{ fil.ipv4.address }}
|
||||
network {{ fil.ipv4.network }}
|
||||
netmask {{ fil.ipv4.netmask }}
|
||||
broadcast {{ fil.ipv4.broadcast }}
|
||||
gateway {{ fil_gateway }}
|
||||
mtu 1496
|
||||
dns-nameservers {{ fil_dns }}
|
||||
|
@ -22,7 +23,7 @@ iface {{ fil_iface.stdout }} inet static
|
|||
{% endif %}
|
||||
|
||||
iface {{ fil_iface.stdout }} inet6 static
|
||||
address {{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv6[0].address }}/{{ hostvars[inventory_hostname]['ansible_' + fil_iface.stdout].ipv6[0].prefix }}
|
||||
address {{ fil.ipv6[0].address }}/{{ fil.ipv6[0].prefix }}
|
||||
{% if 'interfaces' in ansible_local %}
|
||||
{% if 'sup_if_6' in ansible_local.interfaces %}
|
||||
{% if fil_iface.stdout in ansible_local.interfaces.sup_if_6 %}
|
||||
|
|
Loading…
Reference in New Issue