have juju-setup use the new bridge, fix errors
diff --git a/roles/juju-setup/tasks/main.yml b/roles/juju-setup/tasks/main.yml
index ae82be7..58c553d 100644
--- a/roles/juju-setup/tasks/main.yml
+++ b/roles/juju-setup/tasks/main.yml
@@ -7,13 +7,20 @@
release={{ ansible_distribution_release }} arch=amd64
- name: create Virtual Machines with uvt-kvm
- shell: uvt-kvm create {{ item.name }} --cpu={{ item.cpu }} --memory={{ item.memMB }} --disk={{ item.diskGB }} ; \
- uvt-kvm wait --insecure {{ item.name }}
+ shell: uvt-kvm create {{ item.name }} --cpu={{ item.cpu }} --memory={{ item.memMB }} --disk={{ item.diskGB }} --bridge="mgmtbr"
creates=/var/lib/uvtool/libvirt/images/{{ item.name }}.qcow
with_items: "{{ head_vm_list }}"
- name: Have VMs autostart on reboot
- command: virsh autostart {{ item.name }}
+ virt:
+ name={{ item.name }}
+ command=autostart
+ with_items: "{{ head_vm_list }}"
+
+- name: wait for VM's to come up
+ wait_for:
+ host={{ item.name }}
+ port=22
with_items: "{{ head_vm_list }}"
- name: Create /etc/ansible/hosts file
@@ -63,13 +70,12 @@
juju_facts:
# For setwise operations on desired vs Juju state:
-# list of VM names in head_vm_list dict: head_vm_list | map(attribute='name') | list
# list of active juju_machines names: juju_machines.keys()
# list of active juju_services names: juju_services.keys()
- name: Add machines to Juju
command: "juju add-machine ssh:{{ item }}"
- with_items: "{{ head_vm_list | map(attribute='service') | list | difference( juju_machines.keys() ) }}"
+ with_items: "{{ head_vm_list | map(attribute='service') | list | reject('undefined') | difference( juju_machines.keys() ) }}"
# run this again, so machines will be in the juju_machines list
- name: Obtain Juju Facts after machine creation
diff --git a/roles/juju-setup/templates/eth0.cfg.j2 b/roles/juju-setup/templates/eth0.cfg.j2
index 2cf2f33..94c1062 100644
--- a/roles/juju-setup/templates/eth0.cfg.j2
+++ b/roles/juju-setup/templates/eth0.cfg.j2
@@ -3,6 +3,7 @@
iface eth0 inet dhcp
{% if unbound_listen_on_default %}
dns-nameservers{% for host in groups['head'] %} {{ hostvars[host].ansible_default_ipv4.address }}{% endfor %}
+{% endif %}
{% if dns_servers is defined %}
dns-nameservers{% for ns in dns_servers %} {{ ns }}{% endfor %}
{% endif %}
diff --git a/vars/cord_defaults.yml b/vars/cord_defaults.yml
index a862375..5470063 100644
--- a/vars/cord_defaults.yml
+++ b/vars/cord_defaults.yml
@@ -175,10 +175,7 @@
relations: [ "mysql", "keystone", "nrpe", ]
- name: neutron-api
- relations: [ "keystone", "neutron-openvswitch", "mysql", "rabbitmq-server", "nova-cloud-controller", "nrpe", ]
-
- - name: neutron-openvswitch
- relations: [ "rabbitmq-server", ]
+ relations: [ "keystone", "mysql", "rabbitmq-server", "nova-cloud-controller", "nrpe", ]
- name: openstack-dashboard
relations: [ "keystone", "nrpe", ]