fixed formatting and opencloud-cluster scenario issues
diff --git a/roles/config-virt/handlers/main.yml b/roles/config-virt/handlers/main.yml
index d3708e6..325f21d 100644
--- a/roles/config-virt/handlers/main.yml
+++ b/roles/config-virt/handlers/main.yml
@@ -1,8 +1,5 @@
---
-# roles/juju-setup/handlers/tasks.yml
-
-- name: recreate default network
- command: virsh net-destroy default ; virsh net-start default
+# roles/config-virt-net/handlers/tasks.yml
- name: reload libvirt-bin
service:
@@ -12,4 +9,3 @@
- name: run qemu hook
command: /etc/libvirt/hooks/qemu start start
-
diff --git a/roles/config-virt/tasks/main.yml b/roles/config-virt/tasks/main.yml
index 659a521..557a285 100644
--- a/roles/config-virt/tasks/main.yml
+++ b/roles/config-virt/tasks/main.yml
@@ -1,5 +1,5 @@
---
-# roles/config-virt/tasks/main.yml
+# roles/config-virt-net/tasks/main.yml
- name: collect libvirt network facts
virt_net:
@@ -53,4 +53,3 @@
- reload libvirt-bin
- run qemu hook
-
diff --git a/roles/juju-openstack-config/tasks/main.yml b/roles/juju-openstack-config/tasks/main.yml
index 7d6d1b0..8075013 100644
--- a/roles/juju-openstack-config/tasks/main.yml
+++ b/roles/juju-openstack-config/tasks/main.yml
@@ -4,11 +4,11 @@
- name: add compute nodes
command: juju add-machine ssh:ubuntu@{{ item }}
with_items: "{{ groups['compute'] | difference( juju_machines.keys() ) }}"
- register: added-compute-nodes
+ register: added_compute_nodes
# run this again, so add-machine items will be in the juju_compute_nodes list
- name: Obtain Juju Facts after adding compute nodes
- when: added-compute-nodes
+ when: added_compute_nodes
juju_facts:
# the crazy [ ] in the with-items is so that jinja compares arrays of strings,
@@ -16,21 +16,17 @@
- name: add-unit nova-compute to first compute node
command: "juju deploy nova-compute --to {{ juju_machines[item]['machine_id'] }} --config={{ openstack_cfg_path }}"
with_items: "{{ [ groups['compute'][0] ] | difference( juju_compute_nodes.keys() ) }}"
- register: added-first-nova-compute
+ register: added_first_nova_compute
# run this again, so first nova compute will be in the juju_compute_nodes list
- name: Obtain Juju Facts nova-compute deploy
juju_facts:
- when: added-first-nova-compute
+ when: added_first_nova_compute
- name: add-unit nova-compute to other compute nodes
command: "juju add-unit nova-compute --to {{ juju_machines[item]['machine_id'] }}"
with_items: "{{ groups['compute'] | difference( juju_compute_nodes.keys() ) }}"
-# added this to openstack.cfg
-# - name: Have nova-compute use KVM as its virt-type
-# command: juju set nova-compute virt-type=kvm
-
- name: Create relations to compute
command: "juju add-relation '{{ item.0.name }}' '{{ item.1 }}'"
register: compute_relation
@@ -53,4 +49,3 @@
- name: Run network setup script
command: ansible nova-cloud-controller-1 -m script -u ubuntu -a "/usr/local/src/network-setup.sh"
-
diff --git a/roles/juju-openstack-config/handlers/main.yml b/roles/juju-setup/handlers/main.yml
similarity index 63%
rename from roles/juju-openstack-config/handlers/main.yml
rename to roles/juju-setup/handlers/main.yml
index c90c918..d31ae04 100644
--- a/roles/juju-openstack-config/handlers/main.yml
+++ b/roles/juju-setup/handlers/main.yml
@@ -1,5 +1,5 @@
---
-# roles/juju-openstack-config/handlers/tasks.yml
+# roles/juju-setup/handlers/tasks.yml
- name: update-ca-certificates
become: yes