Files
tripleo-operator-ansible/roles/tripleo_overcloud_failures/tasks/main.yml
Alex Schultz 720a1907aa Fix missing OS_CLOUD env var
We have some commands that need authentication credentials. Currently we
forgot to set OS_CLOUD in some places so only using the rc file works.
This patch updates the missing OS_CLOUD vars.

Change-Id: I5a115c355b5933714c30ce11c8e7b76da755c817
2020-02-10 14:47:56 -07:00

32 lines
1.0 KiB
YAML

---
# tasks file for tripleo_overcloud_failures
- name: Setup overcloud failures facts
set_fact:
_failures_cmd: >-
{{ tripleo_overcloud_failures_os_cloud | ternary('', "source " ~ tripleo_overcloud_failures_rc_file ~ "; ") }}
{{ openstack_bin }} overcloud failures
{{ tripleo_overcloud_failures_plan | ternary('--plan ' ~ tripleo_overcloud_failures_plan, '') }}
_failures_env:
OS_CLOUD: "{{ tripleo_overcloud_failures_os_cloud }}"
- name: Show debug information
when: tripleo_overcloud_failures_debug|bool
block:
- name: Show the overcloud failures command
debug:
var: _failures_cmd
- name: Show the overcloud failures environment
debug:
var: _failures_env
- name: Overcloud failures
shell: "{{ _failures_cmd }}" # noqa 305
environment: "{{ _failures_env }}"
register: tripleo_overcloud_failures_result
changed_when: false
- name: Set output fact
set_fact:
tripleo_overcloud_failures_output: "{{ tripleo_overcloud_failures_result.stdout }}"