23 lines
790 B
YAML
23 lines
790 B
YAML
---
|
|
- name: ensure tripleo-upgrade hiera file exists
|
|
include_tasks: create-tripleo-upgrade-file.yml
|
|
|
|
- name: reset tripleo_upgrade_hiera_data_del fact
|
|
set_fact:
|
|
tripleo_upgrade_hiera_data_del: {}
|
|
|
|
- name: remove a tripleo-upgrade key
|
|
set_fact:
|
|
tripleo_upgrade_hiera_data_del: "{{ tripleo_upgrade_hiera_data_del|combine({upgrade_hiera_item.key: upgrade_hiera_item.value}) }}"
|
|
cacheable: no
|
|
when: upgrade_hiera_item.key != tripleo_upgrade_key
|
|
loop_control:
|
|
loop_var: upgrade_hiera_item
|
|
loop: "{{ tripleo_upgrade_hiera_command.stdout | from_json | default({}) | dict2items }}"
|
|
|
|
- name: write the updated tripleo-upgrade hiera data
|
|
copy:
|
|
content: "{{ tripleo_upgrade_hiera_data_del | to_nice_json }}"
|
|
dest: "{{ tripleo_upgrade_hiera_file }}"
|
|
become: yes
|