Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion roles/splunk_common/tasks/remove_config_map_stanza.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@
with_dict: "{{ config_map_stanza_settings }}"
loop_control:
loop_var: config_map_stanza_setting
when: config_map_stanza_name and config_map_stanza_settings
when:
- config_map_stanza_name and config_map_stanza_settings
# Only prune options no longer present in the current desired stanza. Options that are
# still desired (even with a changed value) are left for set_config_stanza.yml's
# idempotent `ini_file state=present` to update in place -- removing them here first
# made every option look changed on every run, even when its value hadn't moved.
- config_map_stanza_setting.key not in (conf_stanzas[config_map_stanza_name] | default({}))