summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/terminate.yml
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-07-20 18:07:10 +0200
committerLénaïc Huard <lhuard@amadeus.com>2016-07-21 09:11:36 +0200
commit887ba6a2a7263985d5f644e37e5428f0a8bd5166 (patch)
treef35fd9dc344f3da1a131dc4de9456e40b0056f03 /playbooks/libvirt/openshift-cluster/terminate.yml
parente56778743abfc0d349ec8bead684389a7c253cc2 (diff)
downloadopenshift-887ba6a2a7263985d5f644e37e5428f0a8bd5166.tar.gz
openshift-887ba6a2a7263985d5f644e37e5428f0a8bd5166.tar.bz2
openshift-887ba6a2a7263985d5f644e37e5428f0a8bd5166.tar.xz
openshift-887ba6a2a7263985d5f644e37e5428f0a8bd5166.zip
Fix libvirt provider for Ansible 2.1.0.0
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/terminate.yml')
-rw-r--r--playbooks/libvirt/openshift-cluster/terminate.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/playbooks/libvirt/openshift-cluster/terminate.yml b/playbooks/libvirt/openshift-cluster/terminate.yml
index baef911f9..df5c52f2d 100644
--- a/playbooks/libvirt/openshift-cluster/terminate.yml
+++ b/playbooks/libvirt/openshift-cluster/terminate.yml
@@ -15,7 +15,7 @@
groups: oo_hosts_to_terminate
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_become: "{{ deployment_vars[deployment_type].become }}"
- with_items: groups[cluster_group] | default([])
+ with_items: '{{ groups[cluster_group] | default([]) }}'
- name: Unsubscribe VMs
hosts: oo_hosts_to_terminate
@@ -42,30 +42,30 @@
command: '{{ item[1] }}'
uri: '{{ libvirt_uri }}'
with_nested:
- - groups['oo_hosts_to_terminate']
+ - "{{ groups['oo_hosts_to_terminate'] }}"
- [ destroy, undefine ]
- name: Delete VM drives
command: 'virsh -c {{ libvirt_uri }} vol-delete --pool {{ libvirt_storage_pool }} {{ item }}.qcow2'
args:
removes: '{{ libvirt_storage_pool_path }}/{{ item }}.qcow2'
- with_items: groups['oo_hosts_to_terminate']
+ with_items: "{{ groups['oo_hosts_to_terminate'] }}"
- name: Delete VM docker drives
command: 'virsh -c {{ libvirt_uri }} vol-delete --pool {{ libvirt_storage_pool }} {{ item }}-docker.qcow2'
args:
removes: '{{ libvirt_storage_pool_path }}/{{ item }}-docker.qcow2'
- with_items: groups['oo_hosts_to_terminate']
+ with_items: "{{ groups['oo_hosts_to_terminate'] }}"
- name: Delete the VM cloud-init image
file:
path: '{{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso'
state: absent
- with_items: groups['oo_hosts_to_terminate']
+ with_items: "{{ groups['oo_hosts_to_terminate'] }}"
- name: Remove the cloud-init config directory
file:
path: '{{ libvirt_storage_pool_path }}/{{ item }}_configdrive/'
state: absent
- with_items: groups['oo_hosts_to_terminate']
+ with_items: "{{ groups['oo_hosts_to_terminate'] }}"