Skip to content

Commit

Permalink
ansible-scylla-monitoring: Add support for dc_suffix during scylla_se…
Browse files Browse the repository at this point in the history
…rvers.yml generation
  • Loading branch information
igorribeiroduarte committed Mar 12, 2024
1 parent 397fb05 commit 68b50d7
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']: (dc_to_node_list | default({}))['-dc ' + hostvars[item]['dc']] | default([]) + [item]} ) }}"
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]} ) }}"
loop: "{{ groups['scylla'] }}"

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

0 comments on commit 68b50d7

Please sign in to comment.