Playbook for removing a broken OpenStack install
Change-Id: I2b3a5daade84446b06f63cbfefd994e41ea0ee2d
diff --git a/roles/teardown-openstack/tasks/main.yml b/roles/teardown-openstack/tasks/main.yml
new file mode 100644
index 0000000..857beb9
--- /dev/null
+++ b/roles/teardown-openstack/tasks/main.yml
@@ -0,0 +1,20 @@
+- name: Remove Juju directory
+ file:
+ path: "{{ ansible_user_dir }}/.juju"
+ state: absent
+
+- name: Remove containers for the OpenStack services
+ become: yes
+ lxd_container:
+ name: "{{ item.name }}"
+ state: absent
+ with_items: "{{ head_lxd_list }}"
+
+- name: Remove PKI directories
+ become: yes
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - /opt/cord/build/platform-install/pki/intermediate_ca
+ - /opt/cord/build/platform-install/pki/root_ca