32 lines
795 B
YAML
32 lines
795 B
YAML
---
|
|
- name: Create/Update a Folder in Grafana
|
|
grafana.grafana.folder:
|
|
title: Ansible Integration test
|
|
uid: test123
|
|
overwrite: true
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: present
|
|
register: create_result
|
|
|
|
- name: Create Check
|
|
ansible.builtin.assert:
|
|
that:
|
|
- create_result.failed == false
|
|
|
|
- name: Delete a folder
|
|
grafana.grafana.folder:
|
|
title: Ansible Integration test
|
|
uid: test123
|
|
overwrite: true
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: absent
|
|
register: delete_result
|
|
|
|
- name: Delete Check
|
|
ansible.builtin.assert:
|
|
that:
|
|
- delete_result.output.status == 200
|
|
- delete_result.output.response == "Folder has been successfully deleted"
|