Remove 'uvt-kvm ip' commands, use DNS
diff --git a/cord-setup.yml b/cord-setup.yml
index c2fb8e0..fef04c9 100644
--- a/cord-setup.yml
+++ b/cord-setup.yml
@@ -32,10 +32,6 @@
- python-keystoneclient
- python-glanceclient
- - name: Patch uvt-kvm
- copy: src=files/usr/lib/python2.7/dist-packages/uvtool/libvirt/__init__.py
- dest=/usr/lib/python2.7/dist-packages/uvtool/libvirt/__init__.py
-
- name: Get juju-ansible git repo
git: repo=https://github.com/cmars/juju-ansible.git
dest=/usr/local/src/juju-ansible
@@ -89,6 +85,14 @@
- hosts: head
sudo: yes
tasks:
+
+ # Yes I know
+ - name: Add local resolver to /etc/resolv.conf
+ lineinfile: dest=/etc/resolv.conf
+ insertafter=".*DO NOT EDIT THIS FILE.*"
+ line="nameserver 192.168.122.1"
+ when: test_setup is defined
+
- name: Create VMs to host OpenCloud services on mgmtbr
sudo: no
script: scripts/create-vms-cord.sh
@@ -99,14 +103,6 @@
script: scripts/create-vms-cord.sh --testing
when: test_setup is defined
- - include: tasks/vm-ips-cord.yml
-
- - name: Add VMs to /etc/hosts
- template: src=templates/etc/cord-hosts.j2
- dest=/etc/hosts
- notify:
- - Reload dnsmasq
-
- name: Set up /etc/ansible/hosts
template: src=templates/etc/ansible/cord-hosts.j2
dest=/etc/ansible/hosts
@@ -129,10 +125,6 @@
sudo: no
shell: ansible services -m ping -u ubuntu
- handlers:
- - name: Reload dnsmasq
- shell: killall -HUP dnsmasq
-
# Play: prepare compute nodes for installation
- hosts: compute
sudo: yes
@@ -172,9 +164,6 @@
shell: juju generate-config
creates={{ ansible_env['PWD'] }}/.juju/environments.yaml
- - shell: uvt-kvm ip juju
- register: juju_ip
-
- name: Juju config file
sudo: no
template: src=templates/environments.yaml.j2
@@ -185,17 +174,18 @@
shell: juju bootstrap
creates={{ ansible_env['PWD'] }}/.juju/environments/manual.jenv
+ - name: Check that 'juju status' works
+ sudo: no
+ shell: juju status
+
- name: Add virtual machines to Juju's control
- script: scripts/juju-cord-setup.py
+ shell: juju add-machine ssh:{{ item }}
+ with_items: "{{ groups['openstack'] }}"
- name: Add compute nodes to Juju's control
shell: juju add-machine ssh:{{ item }}
with_items: "{{ groups['compute'] }}"
- - name: Get onos-cord IP
- shell: uvt-kvm ip onos-cord
- register: onos_cord_ip
-
- name: Copy cord.yaml bundle
template: src=templates/cord.yaml dest={{ ansible_env['PWD'] }}/cord.yaml
@@ -206,10 +196,6 @@
sudo: no
tasks:
- - name: Get Keystone IP
- shell: uvt-kvm ip keystone
- register: keystone_ip
-
- name: Create credentials
template: src=templates/admin-openrc-cord.sh.j2
dest={{ ansible_env['PWD'] }}/admin-openrc.sh