diff options
author | Manuel Buil <mbuil@suse.com> | 2019-08-23 13:55:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-08-23 13:55:39 +0000 |
commit | 645d4f4356a175c12d37abec3128b82bf833448e (patch) | |
tree | 877a0a99e70e979abd1fd5019b31a4a6866b58a2 /xci | |
parent | 4108609cbd83f88e287ddca78e09cc06488c9c0f (diff) | |
parent | 635f6b0468110b437740e8cbbe7a8dbc7947397b (diff) |
Merge "Support for py3"
Diffstat (limited to 'xci')
-rw-r--r-- | xci/files/xci-lib.sh | 7 | ||||
-rwxr-xr-x | xci/playbooks/dynamic_inventory.py | 7 | ||||
-rw-r--r-- | xci/playbooks/roles/create-nodes/files/virtualbmc.conf | 3 | ||||
-rw-r--r-- | xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml | 12 |
4 files changed, 18 insertions, 11 deletions
diff --git a/xci/files/xci-lib.sh b/xci/files/xci-lib.sh index d1e76f59..9e751497 100644 --- a/xci/files/xci-lib.sh +++ b/xci/files/xci-lib.sh @@ -174,13 +174,6 @@ function install_ansible() { ${INSTALLER_CMD} ${install_map[@]} - # Note(cinerama): If pip is linked to pip3, the rest of the install - # won't work. Remove the alternatives. This is due to ansible's - # python 2.x requirement. - if [[ $(readlink -f /etc/alternatives/pip) =~ "pip3" ]]; then - sudo -H update-alternatives --remove pip $(readlink -f /etc/alternatives/pip) - fi - # We need to prepare our virtualenv now virtualenv --quiet --no-site-packages ${XCI_VENV} set +u diff --git a/xci/playbooks/dynamic_inventory.py b/xci/playbooks/dynamic_inventory.py index 0ea35ff7..ed63141c 100755 --- a/xci/playbooks/dynamic_inventory.py +++ b/xci/playbooks/dynamic_inventory.py @@ -127,8 +127,8 @@ class XCIInventory(object): for role in idf['xci']['installers'][self.installer]['nodes_roles'][host]: self.add_to_group(role, hostname) - pdf_host_info = filter(lambda x: x['name'] == host, pdf['nodes'])[0] - native_vlan_if = filter(lambda x: x['vlan'] == 'native', pdf_host_info['interfaces']) + pdf_host_info = list(filter(lambda x: x['name'] == host, pdf['nodes']))[0] + native_vlan_if = list(filter(lambda x: x['vlan'] == 'native', pdf_host_info['interfaces'])) self.add_hostvar(hostname, 'ansible_host', native_vlan_if[0]['address']) self.add_hostvar(hostname, 'ip', native_vlan_if[0]['address']) host_networks[hostname] = {} @@ -173,7 +173,8 @@ class XCIInventory(object): # Now add the additional groups for parent in idf['xci']['installers'][self.installer]['groups'].keys(): - map(lambda x: self.add_group(x, parent), idf['xci']['installers'][self.installer]['groups'][parent]) + for host in idf['xci']['installers'][self.installer]['groups'][parent]: + self.add_group(host, parent) # Read additional group variables self.read_additional_group_vars() diff --git a/xci/playbooks/roles/create-nodes/files/virtualbmc.conf b/xci/playbooks/roles/create-nodes/files/virtualbmc.conf new file mode 100644 index 00000000..f8351dc1 --- /dev/null +++ b/xci/playbooks/roles/create-nodes/files/virtualbmc.conf @@ -0,0 +1,3 @@ +[log] +logfile: /var/log/vbmc.log +debug: true diff --git a/xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml b/xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml index faf19a6f..06afaec3 100644 --- a/xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml +++ b/xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml @@ -125,5 +125,15 @@ - name: install virtualbmc pip: name: virtualbmc - version: 1.3 # >1.3 needs zmq dependency. + version: 1.5 # >1.3 needs zmq dependency. virtualenv: "{{ lookup('env', 'XCI_VENV') }}" + +- name: Create directory for the config of vbmc + file: + path: /etc/virtualbmc + state: directory + +- name: Place the config for virtualbmc + copy: + src: virtualbmc.conf + dest: /etc/virtualbmc/virtualbmc.conf |