2020-07-25 06:05:41 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Convert grafana-server group name if exist
|
|
|
|
ansible.builtin.add_host:
|
2020-07-25 06:05:41 +08:00
|
|
|
name: "{{ item }}"
|
2020-12-08 01:11:54 +08:00
|
|
|
groups: "{{ monitoring_group_name }}"
|
2020-07-25 06:05:41 +08:00
|
|
|
ansible_host: "{{ hostvars[item]['ansible_host'] | default(omit) }}"
|
|
|
|
ansible_port: "{{ hostvars[item]['ansible_port'] | default(omit) }}"
|
2024-02-14 18:14:02 +08:00
|
|
|
with_items: "{{ groups.get((grafana_server_group_name | default('grafana-server')), []) }}"
|
|
|
|
run_once: true
|