Skip to content

Commit

Permalink
scylla-monitoring: add a missing "| default('')" in dc_to_node_list c…
Browse files Browse the repository at this point in the history
…alculation

Signed-off-by: Vlad Zolotarov <[email protected]>
  • Loading branch information
vladzcloudius committed Mar 12, 2024
1 parent 9f88f9d commit bcfc31f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible-scylla-monitoring/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
# Resulting map -> {'-dc dc1': [node1, node2, node3], '-dc dc2': [node4, node5, node6]}
- name: Create a map from dc to its list of nodes
set_fact:
dc_to_node_list: "{{ dc_to_node_list | default({}) | combine( {'-dc ' + hostvars[item]['dc'] + hostvars[item]['dc_suffix']: (dc_to_node_list | default({}))['-dc ' + hostvars[item]['dc'] + hostvars[item]['dc_suffix'] | default('')] | default([]) + [item]} ) }}"
dc_to_node_list: "{{ dc_to_node_list | default({}) | combine( {'-dc ' + hostvars[item]['dc'] + hostvars[item]['dc_suffix'] | default(''): (dc_to_node_list | default({}))['-dc ' + hostvars[item]['dc'] + hostvars[item]['dc_suffix'] | default('')] | default([]) + [item]} ) }}"
loop: "{{ groups['scylla'] }}"

# Resulting str -> "-dc dc1:node1,node2,node3 -dc dc2:node4,node5,node6"
Expand Down

0 comments on commit bcfc31f

Please sign in to comment.