f48331f36b
The commit fixes these issues:
* When tripleo-upgrade-hiera key deleting was used multiple times in a
playbook, the fact tripleo_upgrade_hiera_data_del persisted from the
previous invocation instead of getting gradually filled from empty
dict. This resulted in never deleting the keys except on the first
run of the task.
* When the key deleting was called in an Ansible `loop`, the external
`item` variable and the internal `item` in the deleting code
conflicted on naming, breaking the removal of the key. We now use
`loop_var: upgrade_hiera_item` to avoid naming collisions.
Closes-Bug: #1832827
Change-Id: I3fa0717203f3f6eae852d019bec71e97eb485aa2
(cherry picked from commit
|
||
---|---|---|
.. | ||
defaults | ||
tasks | ||
README.md | ||
test-playbook.yml |
tripleo-upgrade-hiera
An Ansible role to set hiera value during upgrade as json value/key.
Role variables
Required:
tripleo_upgrade_key
-- the hiera key to setup. (optional for remove_all)tripleo_upgrade_value
-- the hiera value to setup. (non-needed for remove and remove_all)
Optional:
tripleo_upgrade_hiera_file
-- hiera file to were the variable go. (defaults to "/etc/puppet/hieradata/upgrade.json")
Test playbook
Assuming you have tripleo-inventory.yml generated, you can run the test playbook like:
ANSIBLE_ROLES_PATH=tripleo-common/roles \
ANSIBLE_HOST_KEY_CHECKING=False \
ansible-playbook
-i tripleo-inventory.yml \
tripleo-common/roles/tripleo-upgrade-hiera/test-playbook.yml
License
Free software: Apache License (2.0)
Author Information
OpenStack TripleO team