tripleo-common/roles/tripleo-upgrade-hiera/tasks/set.yml
Sofer Athlan-Guyot de7df308e0 New role to create/update/delete hiera value during upgrade.
We need to override the cluster definition during upgrade, so that we
can build a one node cluster followed by a two and three nodes
cluster.

Change-Id: Id55a4ea7f0e8a8d95a49ba93853cf7844d938f43
Implements: blueprint upgrades-with-os
2019-01-22 13:53:57 +01:00

16 lines
520 B
YAML

---
- name: ensure tripleo-upgrade hiera file exists
include_tasks: create-tripleo-upgrade-file.yml
- name: set/update the tripleo-upgrade key/value
set_fact:
tripleo_upgrade_hiera_data_add: "{{ tripleo_upgrade_hiera_command.stdout | from_json | combine({ tripleo_upgrade_key: tripleo_upgrade_value }) }}"
cacheable: no
- name: write the updated tripleo-upgrade hiera data
copy:
content: "{{ tripleo_upgrade_hiera_data_add | to_nice_json }}"
dest: "{{tripleo_upgrade_hiera_file}}"
become: yes