ansible bootstrap variables cannot be overridden once for multiple hosts at the same time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Allain Legacy |
Bug Description
Brief Description
-----------------
The Ansible bootstrap playbook defines some variables in host_vars/
The main bootstrap.yml can be modified to insert an additional "include_vars" task to take variables from a site local file. See the following example where a new line has been inserted *before* the inventory_hostname include_vars task.
pre_tasks:
- include_vars: "{{ override_files_dir }}/secret"
failed_when: false
- include_vars: "{{ override_files_dir }}/site.yml"
failed_when: false
- include_vars: "{{ override_files_dir }}/{{ inventory_hostname }}.yml"
failed_when: false
This order is important to ensure that an end user can still apply a per-host override that eclipses a per-site override.
Severity
--------
Minor
Steps to Reproduce
------------------
n/a
Expected Behavior
------------------
It should be possible to override one or more variables on a per-site basis using a single statement per variable.
Actual Behavior
----------------
A variable must be overridden for each host in the host inventory file.
Reproducibility
---------------
100%
System Configuration
-------
Any
Branch/Pull Time/Commit
-------
June 7 latest build.
Last Pass
---------
Unknown
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Developer testing
Enhancement/ Optimization for ansible deployment; useful for deploying multiple systems at once. Marking as release gating given the benefit and the small code change