grafana-ansible-collection/tests/integration/targets/cloud_stack/tasks/main.yml

30 lines
795 B
YAML
Raw Normal View History

- name: Create a Grafana Cloud stack
grafana.grafana.cloud_stack:
2022-11-10 08:45:15 +01:00
name: testansiblestack
stack_slug: testansiblestack
cloud_api_key: "{{ grafana_cloud_api_key }}"
org_slug: "{{ org_name }}"
state: present
register: create_result
- assert:
that:
2022-11-10 08:45:15 +01:00
- create_result.url == "https://testansiblestack.grafana.net"
- name: Sleep for 30 seconds
ansible.builtin.wait_for:
timeout: 30
- name: Delete a Grafana Cloud stack
grafana.grafana.cloud_stack:
2022-11-10 08:45:15 +01:00
name: testansiblestack
stack_slug: testansiblestack
cloud_api_key: "{{ grafana_cloud_api_key }}"
org_slug: "{{ org_name }}"
state: absent
register: delete_result
- assert:
that:
- delete_result.changed == true
2022-11-10 08:45:15 +01:00
- delete_result.url == "https://testansiblestack.grafana.net"