c718a25d7d
* add integration tests * add tests * add checkout * check cat of the file * updatng tests * rename folder * update action * test str api key * update config file name * updated versions for tests * updated action * updated action * update test * updated ytests * updated check * Delete play.yml * updated check * update delete test * updated conditional check * updated check * updated tests * updated tests * Updated tests * Add folder test * fail test * updated tests * updated tests * update tests * add cloud stack test * update stack test * update test * update test * update test * update test * update test * update test * update tests * update tests * updated test * add plugin test * updated tests * add api key test * updat etest * updated tests * add notification policy tree test * reorg * fix * fix * update * add contact point test * update action * Seperate actions * update action name * update action * update action * update seq number * Updating CI tests * Edit Actions
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
- name: Create/Update a dashboard
|
|
grafana.grafana.dashboard:
|
|
dashboard: {
|
|
"dashboard": {
|
|
"uid": test1234,
|
|
"title": "Ansible Integration Test",
|
|
"tags": [ "templated" ],
|
|
"timezone": "browser",
|
|
"schemaVersion": 16,
|
|
"version": 0,
|
|
"refresh": "25s"
|
|
},
|
|
"overwrite": true
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: present
|
|
register: result_present
|
|
|
|
- assert:
|
|
that:
|
|
- result_present.changed == true
|
|
- result_present.output.status == "success"
|
|
|
|
- name: Delete dashboard
|
|
grafana.grafana.dashboard:
|
|
dashboard: {
|
|
"dashboard": {
|
|
"uid": test1234,
|
|
"title": "Ansible Integration Test",
|
|
"tags": [ "templated" ],
|
|
"timezone": "browser",
|
|
"schemaVersion": 16,
|
|
"version": 0,
|
|
"refresh": "25s"
|
|
},
|
|
"overwrite": true
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: absent
|
|
register: result_absent
|
|
|
|
- assert:
|
|
that:
|
|
- result_absent.changed == true
|
|
- result_absent.output.message == "Dashboard Ansible Integration Test deleted" |