Commit 9d58e69e authored by Pietsch, Martin's avatar Pietsch, Martin

added new variable static of network.devices

parent b6baded8
......@@ -34,7 +34,7 @@
line: "{{ 'ifconfig_%s=\"inet %s netmask %s\"' | format(item.key, item.value.ipv4, '%s/%s' | format(item.value.ipv4, network.classes[item.value.class].ipv4.prefix) | ipaddr('netmask')) }}"
regexp: "{{ '^ifconfig_%s=' | format(item.key) }}"
create: yes
when: not (item.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv4.from, dhcp_ranges[item.value.class].ipv4.to))) and item.value.ipv4 is defined
when: ((item.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv4.from, dhcp_ranges[item.value.class].ipv4.to))) or (item.value.static | default(True)) == True) and item.value.ipv4 is defined
with_dict: "{{ network.devices }}"
- name: set dynamic IPv4 network interfaces
......@@ -43,7 +43,7 @@
line: "{{ 'ifconfig_%s=\"SYNCDHCP\"' | format(item.key) }}"
regexp: "{{ '^ifconfig_%s=' | format(item.key) }}"
create: yes
when: (item.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv4.from, dhcp_ranges[item.value.class].ipv4.to))) and item.value.ipv4 is defined
when: ((item.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv4.from, dhcp_ranges[item.value.class].ipv4.to))) and (item.value.static | default(False)) == False) and item.value.ipv4 is defined
with_dict: "{{ network.devices }}"
- name: set IPv4 default gateway
......@@ -60,7 +60,7 @@
line: "{{ 'ifconfig_%s_ipv6=\"inet6 %s prefixlen %s\"' | format(item.key, item.value.ipv6, network.classes[item.value.class].ipv6.prefix) }}"
regexp: "{{ '^ifconfig_%s_ipv6=' | format(item.key) }}"
create: yes
when: not (item.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv6.from, dhcp_ranges[item.value.class].ipv6.to))) and item.value.ipv6 is defined
when: (not (item.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv6.from, dhcp_ranges[item.value.class].ipv6.to))) or (item.value.static | default(True)) == True) and item.value.ipv6 is defined
with_dict: "{{ network.devices }}"
- name: set dynamic IPv6 network interfaces
......@@ -69,7 +69,7 @@
line: "{{ 'ifconfig_%s_ipv6=\"SYNCDHCP\"' | format(item.key) }}"
regexp: "{{ '^ifconfig_%s_ipv6=' | format(item.key) }}"
create: yes
when: (item.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv6.from, dhcp_ranges[item.value.class].ipv6.to))) and item.value.ipv6 is defined
when: ((item.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[item.value.class].ipv6.from, dhcp_ranges[item.value.class].ipv6.to))) or (item.value.static | default(False)) == False) and item.value.ipv6 is defined
with_dict: "{{ network.devices }}"
- name: set IPv6 default gateway
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment