Add defaults for lxc container_tech

When upgrading the container_tech option may be undefined. This change
adds defaults to the container_tech conditional following the patter we
use through the rest of the playbooks.

Closes-Bug: #1747628
Change-Id: I415116f92f164a36f4594f3d11d109e60f62a9bd
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-02-06 09:51:08 -06:00 committed by Kevin Carter (cloudnull)
parent 1c7829b200
commit 6c50146670
2 changed files with 5 additions and 5 deletions

View File

@ -89,7 +89,7 @@
{% endif %}
with_dict: "{{ cinder_backends | default({}) }}"
when:
- container_tech == 'lxc'
- container_tech | default('lxc') == 'lxc'
- physical_host != container_name
- cinder_backend_lvm_inuse | bool
delegate_to: "{{ physical_host }}"

View File

@ -93,7 +93,7 @@
'added' in device_add.stdout.lower()
delegate_to: "{{ physical_host }}"
when:
- container_tech == 'lxc'
- container_tech | default('lxc') == 'lxc'
- "'nova_compute' in group_names"
- "not is_metal | bool"
tags:
@ -104,7 +104,7 @@
lxc-device -n {{ container_name }} add /dev/net/tun /dev/net/tun
delegate_to: "{{ physical_host }}"
when:
- container_tech == 'lxc'
- container_tech | default('lxc') == 'lxc'
- "'nova_compute' in group_names"
- "not is_metal | bool"
tags:
@ -116,7 +116,7 @@
delegate_to: "{{ physical_host }}"
register: kvm_device
when:
- container_tech == 'lxc'
- container_tech | default('lxc') == 'lxc'
- "'nova_compute' in group_names"
- "not is_metal | bool"
tags:
@ -131,7 +131,7 @@
changed_when: >
'added' in device_add.stdout.lower()
when:
- container_tech == 'lxc'
- container_tech | default('lxc') == 'lxc'
- "'nova_compute' in group_names"
- "not is_metal | bool"
- "'ischr' in kvm_device.stat and kvm_device.stat.ischr | bool"