Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from Nemental/test/molecule-scenarios
Browse files Browse the repository at this point in the history
test: molecule test cases
  • Loading branch information
rndmh3ro authored Nov 29, 2023
2 parents a476181 + 3851e44 commit 5670fe4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
24 changes: 20 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
http_proxy: "{{ lookup('env', 'HTTP_PROXY') | default(omit) }}"
https_proxy: "{{ lookup('env', 'HTTPS_PROXY') | default(omit) }}"
no_proxy: "{{ lookup('env', 'NO_PROXY') | default(omit) }}"
tasks:
- name: Include ansible-role-grafana
ansible.builtin.include_role:
name: ansible-role-grafana

vars:
grafana_url: http://localhost:3000
grafana_username: admin
grafana_password: admin

grafana_organizations:
- name: my_org

grafana_datasources:
- name: Loki
ds_type: loki
Expand All @@ -24,6 +24,22 @@
- name: my_service
- name: other_service

grafana_teams:
- name: my_team
email: [email protected]

grafana_users:
- name: Test User
login: testuser
password: supersecure!123
email: [email protected]

grafana_dashboards:
- folder: my_service
path: test_dashboard.json
overwrite: true

tasks:
- name: Include ansible-role-grafana
ansible.builtin.include_role:
name: ansible-role-grafana
3 changes: 2 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ driver:
name: docker
platforms:
- name: instance
image: rndmh3ro/docker-debian11-ansible:latest
image: rndmh3ro/docker-debian12-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-/lib/systemd/systemd}
env:
container: docker
pre_build_image: true
platform: amd64
provisioner:
name: ansible
config_options:
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
commit_message: "{{ dashboard.commit_message | default(omit) }}"
loop: "{{ grafana_dashboards }}"
loop_control: {loop_var: dashboard}
tags: dashboard
tags: [dashboard, molecule-idempotence-notest]

0 comments on commit 5670fe4

Please sign in to comment.