Files
tripleo-operator-ansible/roles/tripleo_overcloud_status/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
982 B
YAML

---
# tasks file for tripleo_overcloud_status
- name: Setup overcloud status facts
set_fact:
_status_cmd: >-
{{ tripleo_overcloud_status_os_cloud | ternary('', "source " ~ tripleo_overcloud_status_rc_file ~ "; ") }}
openstack overcloud status
{{ tripleo_overcloud_status_plan | ternary('--plan ' ~ tripleo_overcloud_status_plan, '') }}
_status_env:
OS_CLOUD: "{{ tripleo_overcloud_status_os_cloud }}"
- name: Show debug information
when: tripleo_overcloud_status_debug|bool
block:
- name: Show the overcloud status command
debug:
var: _status_cmd
- name: Show the overcloud status environment
debug:
var: _status_env
- name: Overcloud status
shell: "{{ _status_cmd }}" # noqa 305
environment: "{{ _status_env }}"
register: tripleo_overcloud_status_result
changed_when: false
- name: Set output fact
set_fact:
tripleo_overcloud_status_output: "{{ tripleo_overcloud_status_result.stdout }}"