Make libvirt role usable by zuul reproducer
- Add become true to create /opt/vm_imaves - Install libvirt packages without with_items - Remove delgetate_to at password copy To check libvirt results https://review.rdoproject.org/r/#/c/18121/ look for the -libvirt job Story: https://tree.taiga.io/project/tripleo-ci-board/task/470?kanban-status=1447276 Change-Id: I7fb6a5e153691262ac404d5ab17f4baa2f7ffb3c
This commit is contained in:
parent
a2c705426e
commit
4a6cacaeee
|
@ -3,9 +3,11 @@
|
|||
# Note: the virt_pool module is not working properly on rhel-7.2
|
||||
# https://bugs.launchpad.net/tripleo-quickstart/+bug/1597905
|
||||
- name: ensure libvirt volume path exists
|
||||
become: true
|
||||
file:
|
||||
path: "{{ libvirt_volume_path }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Check volume pool
|
||||
command: >
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
register: hash
|
||||
|
||||
- name: Copy generated password to file
|
||||
delegate_to: localhost
|
||||
copy:
|
||||
content: "{{ hash.stdout }}"
|
||||
dest: "{{ working_dir }}/pwtemp"
|
||||
|
@ -190,6 +189,12 @@
|
|||
subnode_public_ip: "{{ subnode_0_ip }}"
|
||||
ansible_python_interpreter: "{{ python_interpreter|default('/usr/bin/python') }}"
|
||||
|
||||
- name: Add subnode-0 to known_hosts
|
||||
known_hosts:
|
||||
name: "{{ subnode_0_ip }}"
|
||||
key: "{{ lookup('pipe', 'ssh-keyscan
|
||||
-t ecdsa-sha2-nistp256 ' + subnode_0_ip) }}"
|
||||
|
||||
- name: Set hostname correctly for subnode-0
|
||||
delegate_to: subnode-0
|
||||
shell: >
|
||||
|
@ -231,6 +236,12 @@
|
|||
subnode_public_ip: "{{ subnode_1_ip }}"
|
||||
ansible_python_interpreter: "{{ python_interpreter|default('/usr/bin/python') }}"
|
||||
|
||||
- name: Add subnode-1 to known_hosts
|
||||
known_hosts:
|
||||
name: "{{ subnode_1_ip }}"
|
||||
key: "{{ lookup('pipe', 'ssh-keyscan
|
||||
-t ecdsa-sha2-nistp256 ' + subnode_1_ip) }}"
|
||||
|
||||
- name: Set hostname correctly for subnode-1
|
||||
delegate_to: subnode-1
|
||||
shell: >
|
||||
|
|
|
@ -9,7 +9,7 @@ overcloud_nodes:
|
|||
|
||||
- name: subnode-1
|
||||
flavor: control
|
||||
pub_key: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub"
|
||||
pub_key: "~/.ssh/id_rsa.pub"
|
||||
image_fetch_dir: "{{ local_working_dir }}"
|
||||
libvirt_nodepool_vms: true
|
||||
create_instackenv_json: false
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- name: Include vars for libvirt-nodepool
|
||||
include_vars:
|
||||
file: ../roles/libvirt/setup/overcloud/tasks/vars/libvirt_nodepool_vars.yml
|
||||
file: "{{ role_path }}/../../setup/overcloud/tasks/vars/libvirt_nodepool_vars.yml"
|
||||
when: libvirt_nodepool|default(false)
|
||||
|
||||
- name: Check if libvirt is available
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
# different list of packages.
|
||||
- name: Install packages for libvirt
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name: "{{ libvirt_packages }}"
|
||||
state: present
|
||||
with_items: "{{ libvirt_packages }}"
|
||||
become: true
|
||||
|
||||
- name: Start libvirtd
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% if hostvars[groups['virthost'][0]].ansible_host is defined %}
|
||||
{% if groups.virthost is defined and hostvars[groups['virthost'][0]].ansible_host is defined %}
|
||||
|
||||
Host virthost
|
||||
Hostname {{ hostvars[groups['virthost'][0]].ansible_host }}
|
||||
|
|
Loading…
Reference in New Issue