Commit 0eb292c9 authored by Pietsch, Martin's avatar Pietsch, Martin

bugfixes in upgrade tasks

parent 0cd05858
......@@ -17,8 +17,6 @@
state: state
register: cstate
- debug:
var: cstate
- set_fact:
fuprm: "{{ '-b %s' | format(cstate.path) }}"
......@@ -51,18 +49,19 @@
ASSUME_ALWAYS_YES: "yes"
- set_fact:
us: "{{ (puout.stdout_lines | regex_filter_list('->') | length()) > 0 or (fuout.stdout_lines | regex_filter_list('^[/]') | length()) > 0 }}"
_upgradestate: "{{ (puout.stdout_lines | regex_filter_list('->') | length()) > 0 or (fuout.stdout_lines | regex_filter_list('^[/]') | length()) > 0 }}"
- set_fact:
upgraded: "{{ upgraded | combine({ 'host': us }) }}"
upgraded: "{{ upgraded | combine({ 'host': _upgradestate }) }}"
when: container is not defined
- block:
- set_fact:
upgraded: "{{ upgraded | combine({ container.name: us}) }}"
upgraded: "{{ upgraded | combine({ container.jailname: _upgradestate }) }}"
- jail:
name: "{{ container.jailname }}"
state: restart
when: upgraded[container.name] == True and upgraded["host"] == False
when: upgraded[container.jailname] == True and upgraded["host"] == False
when: container is defined
......@@ -2,22 +2,25 @@
- set_fact:
doreboot: False
- block:
- set_fact:
- name: get hostname of migrationhost
set_fact:
migrationhost: "{{ inventory_hostname | regex_replace('^' + system_productive_prefix, system_development_prefix) }}"
- set_fact:
- name: get IP of migrationhost
set_fact:
migrationhostip: "{{ hostvars[migrationhost].network.devices[hostvars[migrationhost].network.control_device].ipv4 | default(hostvars[migrationhost].network.devices[hostvars[migrationhost].network.control_device].ipv6) }}"
- include_tasks: _doupgrade.yml
when: system_upgrade_states[migrationhost].host == True
- jail:
- name: gathering all jail container
jail:
state: list
register: contlist
- jail:
- name: migrate jail container
jail:
name: "{{ container.key }}"
state: migrate
create_nullfs: True
......
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