Gather facts also before validate-ha

Since we use the variable ansible_hostname when cycling on the inventory
hosts file, we need to gather_facts from all the overcloud nodes,
otherwise will get an error related to the undefined variable.
This also force us to split the way in which we copy ha-test-suite on
undercloud and overcloud nodes, since the undercloud node can have an
ansible_hostname different from "undercloud".

Change-Id: I3af2895110ccd89209feaa3da0a1b35d6842758e
This commit is contained in:
Raoul Scarazzini 2017-09-15 02:49:05 -04:00
parent c04a259b65
commit 5727f7b8c8
3 changed files with 17 additions and 3 deletions

View File

@ -125,6 +125,12 @@
tags:
- overcloud-deploy-check
- name: Gather undercloud and overcloud facts
hosts: undercloud overcloud
gather_facts: yes
tags:
- overcloud-validate-ha
- name: Validate the overcloud using HA tests
hosts: undercloud
gather_facts: no

View File

@ -1,4 +1,7 @@
---
- name: Gather undercloud and overcloud facts
hosts: undercloud overcloud
gather_facts: yes
- name: Validate overcloud HA status
hosts: undercloud

View File

@ -17,13 +17,18 @@
"{{ working_dir }}/workarounds.sh"
when: apply_workarounds
- name: Copy ha-test-suite on undercloud and controllers
- name: Copy ha-test-suite on undercloud
synchronize:
src: "{{ local_working_dir }}/tripleo-quickstart-utils/tools/ha-test-suite/"
dest: "{{ working_dir }}/ha-test-suite"
use_ssh_args: true
- name: Copy ha-test-suite on controllers
shell: >
/usr/bin/rsync --delay-updates -F --compress --archive -e 'ssh -F {{ local_working_dir }}/ssh.config.ansible' {{ local_working_dir }}/tripleo-quickstart-utils/tools/ha-test-suite {{ hostvars[item]['ansible_hostname'] }}:
/usr/bin/rsync --delay-updates -F --compress --archive -e 'ssh -F {{ local_working_dir }}/ssh.config.ansible' {{ local_working_dir }}/tripleo-quickstart-utils/tools/ha-test-suite {{ hostvars[item]['ansible_hostname'] }}:
delegate_to: "localhost"
with_items:
- "{{ groups['controller'] }}"
- "undercloud"
- name: Include test sequence depending on release
include_vars: