Commit 4dc12997 authored by Pietsch, Martin's avatar Pietsch, Martin

prevent usage of variable upgraded in the productive environment

parent 08231b36
......@@ -52,17 +52,17 @@
- name: set update result of host to return value upgraded
set_fact:
upgraded: "{{ upgraded | combine({ 'host': {'state': _upgradestate, 'creationtime': '0'}}) }}"
when: container is not defined
when: container is not defined and system_upgrade_states not defined
- block:
- name: set update result of jail to return value upgraded
set_fact:
upgraded: "{{ upgraded | combine({ container.jailname: {'state': _upgradestate, 'creationtime': ctime}}) }}"
upgraded: "{{ upgraded | combine({ container.jailname: {'state': _upgradestate, 'creationtime': ctime}}) }}"
- name: restart jail
jail:
name: "{{ container.jailname }}"
state: restart
when: upgraded[container.jailname].state == True and upgraded["host"].state == False
when: container is defined
when: container is defined and system_upgrade_states not defined
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