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
This commit is contained in:
parent
414cd8bfd9
commit
720a1907aa
@ -65,6 +65,7 @@
|
||||
DEPLOY_CONFIG_DOWNLOAD_TIMEOUT: "{{ tripleo_overcloud_deploy_config_download_timeout }}"
|
||||
DEPLOY_PYTHON_INTERPRETER: "{{ tripleo_overcloud_deploy_deployment_python_interpreter }}"
|
||||
DEPLOY_BAREMETAL_DEPLOYMENT: "{{ tripleo_overcloud_deploy_baremetal_deployment }}"
|
||||
OS_CLOUD: "{{ tripleo_overcloud_deploy_os_cloud }}"
|
||||
|
||||
- name: Preserve existing log file if exists
|
||||
timestamp_file:
|
||||
|
@ -10,14 +10,23 @@
|
||||
{{ tripleo_overcloud_export_force_overwrite | ternary('--force-overwrite', '') }}
|
||||
{{ tripleo_overcloud_export_config_download_dir | ternary('--config-download-dir ' ~ tripleo_overcloud_export_config_download_dir, '') }}
|
||||
{{ tripleo_overcloud_export_no_password_excludes | ternary('--no-password-excludes', '') }}
|
||||
_export_env:
|
||||
OS_CLOUD: "{{ tripleo_overcloud_export_os_cloud }}"
|
||||
|
||||
- name: Show the overcloud export command
|
||||
debug:
|
||||
var: _export_cmd
|
||||
- name: Show debug information
|
||||
when: tripleo_overcloud_export_debug|bool
|
||||
block:
|
||||
- name: Show the overcloud export command
|
||||
debug:
|
||||
var: _export_cmd
|
||||
|
||||
- name: Show the overcloud export environment
|
||||
debug:
|
||||
var: _export_env
|
||||
|
||||
- name: Overcloud export
|
||||
shell: "{{ _export_cmd }}" # noqa 305
|
||||
environment: "{{ _export_env }}"
|
||||
register: tripleo_overcloud_export_result
|
||||
changed_when: false
|
||||
|
||||
|
@ -6,14 +6,23 @@
|
||||
{{ 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 the overcloud failures command
|
||||
debug:
|
||||
var: _failures_cmd
|
||||
- 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
|
||||
|
||||
|
@ -8,14 +8,23 @@
|
||||
{{ tripleo_overcloud_node_clean_node_uuids | join(' ') }}
|
||||
{{ tripleo_overcloud_node_clean_all_manageable | ternary('--all-manageable', '') }}
|
||||
{{ tripleo_overcloud_node_clean_provide | ternary('--provide', '') }}
|
||||
_clean_env:
|
||||
OS_CLOUD: "{{ tripleo_overcloud_node_clean_os_cloud }}"
|
||||
|
||||
- name: Show the node clean command
|
||||
debug:
|
||||
var: _clean_cmd
|
||||
- name: Show debug information
|
||||
when: tripleo_overcloud_node_clean_debug|bool
|
||||
block:
|
||||
- name: Show the node clean command
|
||||
debug:
|
||||
var: _clean_cmd
|
||||
|
||||
- name: Show the node clean environment
|
||||
debug:
|
||||
var: _clean_env
|
||||
|
||||
- name: Clean node
|
||||
shell: "{{ _clean_cmd }}" # noqa 305
|
||||
environment: "{{ _clean_env }}"
|
||||
register: tripleo_overcloud_node_clean_result
|
||||
changed_when: true
|
||||
|
||||
|
@ -15,15 +15,23 @@
|
||||
{{ tripleo_overcloud_node_configure_root_device_minimum_size | ternary('--root-device-minimum-size '
|
||||
~ tripleo_overcloud_node_configure_root_device_minimum_size, '') }}
|
||||
{{ tripleo_overcloud_node_configure_overwrite_root_device_hints | ternary('--overwrite-root-device-hints', '') }}
|
||||
_configure_env:
|
||||
OS_CLOUD: "{{ tripleo_overcloud_node_configure_os_cloud }}"
|
||||
|
||||
|
||||
- name: Show the node configure command
|
||||
debug:
|
||||
var: _configure_cmd
|
||||
- name: Show debug information
|
||||
when: tripleo_overcloud_node_configure_debug|bool
|
||||
block:
|
||||
- name: Show the node configure command
|
||||
debug:
|
||||
var: _configure_cmd
|
||||
|
||||
- name: Show the node configure envrionment
|
||||
debug:
|
||||
var: _configure_env
|
||||
|
||||
- name: Configure node
|
||||
shell: "{{ _configure_cmd }}" # noqa 305
|
||||
environment: "{{ _configure_env }}"
|
||||
register: tripleo_overcloud_node_configure_result
|
||||
changed_when: true
|
||||
|
||||
|
@ -17,8 +17,8 @@ Role Variables
|
||||
* `tripleo_overcloud_node_introspect_run_validations`: Run the pre-deployment validations.
|
||||
These external validations are from the TripleO Validations project.
|
||||
* `tripleo_overcloud_node_introspect_concurrency`: Maximum number of nodes to introspect at once.
|
||||
* `tripleo_overcloud_node_configure_os_cloud`: (String) OS_CLOUD value to use when running the command. If `tripleo_os_cloud` is defined, it will be the default. Otherwise the default is ''. This variable takes precedence over `tripleo_overcloud_node_configure_rc_file`.
|
||||
* `tripleo_overcloud_node_configure_rc_file`: (String) Path to the credential file to use. If `tripleo_rc_file` is defined, it will be the default. Default: "{{ ansible_env.HOME }}/stackrc"
|
||||
* `tripleo_overcloud_node_introspect_os_cloud`: (String) OS_CLOUD value to use when running the command. If `tripleo_os_cloud` is defined, it will be the default. Otherwise the default is ''. This variable takes precedence over `tripleo_overcloud_node_introspect_rc_file`.
|
||||
* `tripleo_overcloud_node_introspect_rc_file`: (String) Path to the credential file to use. If `tripleo_rc_file` is defined, it will be the default. Default: "{{ ansible_env.HOME }}/stackrc"
|
||||
|
||||
NOTE: Please note that this command should be run against the undercloud so the
|
||||
OS_CLOUD or rc file variables should be set to use the 'undercloud' when
|
||||
|
@ -7,5 +7,5 @@ tripleo_overcloud_node_introspect_all_manageable: false
|
||||
tripleo_overcloud_node_introspect_provide: false
|
||||
tripleo_overcloud_node_introspect_run_validations: false
|
||||
tripleo_overcloud_node_introspect_concurrency:
|
||||
tripleo_overcloud_node_configure_os_cloud: "{{ tripleo_os_cloud | default('') }}"
|
||||
tripleo_overcloud_node_configure_rc_file: "{{ tripleo_rc_file | default(ansible_env.HOME ~ '/stackrc') }}"
|
||||
tripleo_overcloud_node_introspect_os_cloud: "{{ tripleo_os_cloud | default('') }}"
|
||||
tripleo_overcloud_node_introspect_rc_file: "{{ tripleo_rc_file | default(ansible_env.HOME ~ '/stackrc') }}"
|
||||
|
@ -3,22 +3,30 @@
|
||||
- name: Setup overcloud node introspect command
|
||||
set_fact:
|
||||
_introspect_cmd: >-
|
||||
{{ tripleo_overcloud_node_configure_os_cloud | ternary('', "source " ~ tripleo_overcloud_node_configure_rc_file ~ "; ") }}
|
||||
{{ tripleo_overcloud_node_introspect_os_cloud | ternary('', "source " ~ tripleo_overcloud_node_introspect_rc_file ~ "; ") }}
|
||||
{{ openstack_bin }} overcloud node introspect
|
||||
{{ tripleo_overcloud_node_introspect_node_uuids | join(' ') }}
|
||||
{{ tripleo_overcloud_node_introspect_all_manageable | ternary('--all-manageable', '') }}
|
||||
{{ tripleo_overcloud_node_introspect_provide | ternary('--provide', '') }}
|
||||
{{ tripleo_overcloud_node_introspect_run_validations | ternary('--run-validations', '') }}
|
||||
{{ tripleo_overcloud_node_introspect_concurrency | ternary('--concurrency ' ~ tripleo_overcloud_node_introspect_concurrency, '') }}
|
||||
_introspect_env:
|
||||
OS_CLOUD: "{{ tripleo_overcloud_node_introspect_os_cloud }}"
|
||||
|
||||
|
||||
- name: Show the node introspect command
|
||||
debug:
|
||||
var: _introspect_cmd
|
||||
- name: Show debug information
|
||||
when: tripleo_overcloud_node_introspect_debug|bool
|
||||
block:
|
||||
- name: Show the node introspect command
|
||||
debug:
|
||||
var: _introspect_cmd
|
||||
|
||||
- name: Show the node introspect environment
|
||||
debug:
|
||||
var: _introspect_env
|
||||
|
||||
- name: Introspect node
|
||||
shell: "{{ _introspect_cmd }}" # noqa 305
|
||||
environment: "{{ _introspect_env }}"
|
||||
register: tripleo_overcloud_node_introspect_result
|
||||
changed_when: true
|
||||
|
||||
|
@ -6,14 +6,23 @@
|
||||
{{ 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 the overcloud status command
|
||||
debug:
|
||||
var: _status_cmd
|
||||
- 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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user