parameterized roles which can import 1 or multiple dashboards based on requirements

6 views
Skip to first unread message

anilkumar panditi

unread,
Jan 14, 2020, 11:22:44 PM1/14/20
to Ansible Project
I have following ansible playbook ,which will import few dashboards in an iteration, but i am trying to import dashboard based on input parameter(like kafka,kubernetes etc).

could anyone help please.

-Playbook:
---------------------
--
- name: Import Grafana dashboard
  grafana_dashboard:
    grafana_url: <hostIP>:3000
    state: present
    message: Updated by ansible
    overwrite: yes
    path: "{{ item }}"
  with_items:
      - /home/centos/1-12-dc-os-global-kafka-dashboard_rev4.json
      - /home/centos/1-kubernetes-deployment-statefulset-daemonset-metrics_rev1.json
      - /home/centos/Kubernetes-cluster-monitoring-via-Prometheus-DICE-test.json
 
Reply all
Reply to author
Forward
0 new messages