Commit 66dbd76b authored by Pietsch, Martin's avatar Pietsch, Martin

convert loop variable container to _container

parent c51d12a0
......@@ -38,7 +38,7 @@
line: "{{ 'ifconfig_%s=\"inet %s netmask %s\"' | format(_netdev.key, _netdev.value.ipv4, '%s/%s' | format(_netdev.value.ipv4, network.classes[_netdev.value.class].ipv4.prefix) | ipaddr('netmask')) }}"
regexp: "{{ '^ifconfig_%s=' | format(_netdev.key) }}"
create: yes
when: ((_netdev.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv4.from, dhcp_ranges[_netdev.value.class].ipv4.to))) or (_netdev.value.static | default(True)) == True) and _netdev.value.ipv4 is defined
when: not ((_netdev.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv4.from, dhcp_ranges[_netdev.value.class].ipv4.to))) == True and (_netdev.value.static | default(False)) == False) and _netdev.value.ipv4 is defined
loop: "{{ network.devices | dict2items }}"
loop_control:
loop_var: _netdev
......@@ -49,7 +49,7 @@
line: "{{ 'ifconfig_%s=\"SYNCDHCP\"' | format(_netdev.key) }}"
regexp: "{{ '^ifconfig_%s=' | format(_netdev.key) }}"
create: yes
when: ((_netdev.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv4.from, dhcp_ranges[_netdev.value.class].ipv4.to))) and (_netdev.value.static | default(False)) == False) and _netdev.value.ipv4 is defined
when: ((_netdev.value.ipv4 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv4.from, dhcp_ranges[_netdev.value.class].ipv4.to))) == True and (_netdev.value.static | default(False)) == False) and _netdev.value.ipv4 is defined
loop: "{{ network.devices | dict2items }}"
loop_control:
loop_var: _netdev
......@@ -68,7 +68,7 @@
line: "{{ 'ifconfig_%s_ipv6=\"inet6 %s prefixlen %s\"' | format(_netdev.key, _netdev.value.ipv6, network.classes[_netdev.value.class].ipv6.prefix) }}"
regexp: "{{ '^ifconfig_%s_ipv6=' | format(_netdev.key) }}"
create: yes
when: (not (_netdev.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv6.from, dhcp_ranges[_netdev.value.class].ipv6.to))) or (_netdev.value.static | default(True)) == True) and _netdev.value.ipv6 is defined
when: not ((_netdev.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv6.from, dhcp_ranges[_netdev.value.class].ipv6.to))) == True and (_netdev.value.static | default(False)) == False) and _netdev.value.ipv6 is defined
loop: "{{ network.devices | dict2items }}"
loop_control:
loop_var: _netdev
......@@ -79,7 +79,7 @@
line: "{{ 'ifconfig_%s_ipv6=\"SYNCDHCP\"' | format(_netdev.key) }}"
regexp: "{{ '^ifconfig_%s_ipv6=' | format(_netdev.key) }}"
create: yes
when: ((_netdev.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv6.from, dhcp_ranges[_netdev.value.class].ipv6.to))) or (_netdev.value.static | default(False)) == False) and _netdev.value.ipv6 is defined
when: ((_netdev.value.ipv6 | default(False) | ip_in_range('%s-%s' | format(dhcp_ranges[_netdev.value.class].ipv6.from, dhcp_ranges[_netdev.value.class].ipv6.to))) == True and (_netdev.value.static | default(False)) == False) and _netdev.value.ipv6 is defined
loop: "{{ network.devices | dict2items }}"
loop_control:
loop_var: _netdev
......
- name: configure container
include_tasks: _pkgconfigure.yml
when: (container.container | default(False)) == True
when: (_container.container | default(False)) == True
loop: "{{ function_packages }}"
loop_control:
loop_var: container
loop_var: _container
......@@ -27,17 +27,17 @@
- name: configure containers devfs
include_tasks: _jaildevfs.yml
when: (container.container | default(False)) == True
when: (_container.container | default(False)) == True
loop: "{{ function_packages }}"
loop_control:
loop_var: container
loop_var: _container
- block:
- name: create and configure container
include_tasks: _jailcreation.yml
when: (container.container | default(False)) == True
when: (_container.container | default(False)) == True
loop: "{{ function_packages }}"
loop_control:
loop_var: container
loop_var: _container
when: (system_suppress_container_creation | default(False)) == False
......@@ -32,10 +32,10 @@
- name: create and configure container
include_tasks: _jailcreation.yml
when: (container.container | default(False)) == True
when: (_container.container | default(False)) == True
loop: "{{ function_packages }}"
loop_control:
loop_var: container
loop_var: _container
when: function_container_used == True
- name: install and configure native packages
......
......@@ -22,14 +22,14 @@
- name: migrate jail container
jail:
name: "{{ container.key }}"
name: "{{ _container.key }}"
state: migrate
create_nullfs: True
migration_host: "{{ migrationhostip }}"
when: (not (container.key in contlist.jails) or container.value == True) and container.key != 'host'
when: (not (_container.key in contlist.jails) or _container.value == True) and _container.key != 'host'
loop: "{{ system_upgrade_states[migrationhost] | dict2items }}"
loop_control:
loop_var: container
loop_var: _container
- name: set variable that controls the reboot of the host
set_fact:
......@@ -45,10 +45,10 @@
- include_tasks: _doupgrade.yml
- include_tasks: _doupgrade.yml
when: (container.container | default(False)) == True
when: (_container.container | default(False)) == True
loop: "{{ (function_packages | default([])) }}"
loop_control:
loop_var: container
loop_var: _container
- name: set upgrade results to variable system_upgrade_states
set_fact:
......
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