]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Adopt with grafana_network not grafana_server_addr mergify/bp/stable-9.0/pr-7654 7656/head
authorJohn Fulton <fulton@redhat.com>
Fri, 7 Feb 2025 18:08:03 +0000 (13:08 -0500)
committerTeoman ONAY <tonay@ibm.com>
Tue, 11 Feb 2025 12:59:53 +0000 (13:59 +0100)
The networks list in a spec is usually a list of ranges,
not a single IP. The grafana_server_addr is a fact created
from the grafana_network range so it is a more appropriate
parameter to pass to the spec.

Follow up to 770a527a9ee6b34091798c6120235026ad1ecfa9

Signed-off-by: John Fulton <fulton@redhat.com>
(cherry picked from commit b1f7e2da0602ab4234c511774a6c098a8e753eb9)

infrastructure-playbooks/cephadm-adopt.yml

index e542dcdd7ce84eb7535986ea96f0b602cb8014c1..fa603f7bfb8822b52e8b13e858d328b1f389d612 100644 (file)
               placement:
                 label: "{{ monitoring_group_name }}"
                 count: "{{ groups.get(monitoring_group_name, []) | length }}"
-              {% if grafana_server_addr is defined %}
-              networks:
-              - {{ grafana_server_addr }}
+              {% if grafana_network is defined %}
+              networks: {{ grafana_network.split(',') | list if ',' in grafana_network else [grafana_network] }}
               {% endif %}
           delegate_to: "{{ groups[mon_group_name][0] }}"
           environment:
               placement:
                 label: {{ monitoring_group_name }}
                 count: {{ groups.get(monitoring_group_name, []) | length }}
+              {% if grafana_network is defined %}
+              networks: {{ grafana_network.split(',') | list if ',' in grafana_network else [grafana_network] }}
+              {% endif %}
               {% if prometheus_port is defined and prometheus_port != 9095 %}
               spec:
                 port: {{ prometheus_port }}