ceph-ansible/roles/ceph-facts/tasks/convert_grafana_server_grou...

10 lines
405 B
YAML
Raw Normal View History

---
- name: Convert grafana-server group name if exist
ansible.builtin.add_host:
name: "{{ item }}"
groups: "{{ monitoring_group_name }}"
ansible_host: "{{ hostvars[item]['ansible_host'] | default(omit) }}"
ansible_port: "{{ hostvars[item]['ansible_port'] | default(omit) }}"
with_items: "{{ groups.get((grafana_server_group_name | default('grafana-server')), []) }}"
run_once: true