2020-07-25 06:05:41 +08:00
|
|
|
---
|
|
|
|
- name: convert grafana-server group name if exist
|
|
|
|
add_host:
|
|
|
|
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) }}"
|
2020-12-08 01:11:54 +08:00
|
|
|
with_items: "{{ groups.get((grafana_server_group_name|default('grafana-server')), []) }}"
|
2020-07-25 06:05:41 +08:00
|
|
|
run_once: True
|