Skip to content

Commit

Permalink
add molecule test for go-carbon
Browse files Browse the repository at this point in the history
  • Loading branch information
tbauriedel committed Aug 16, 2024
1 parent 4d66f11 commit 18e8b7b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Test role carbonapi
name: Ansible deployment

on:
pull_request:
Expand All @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
distro: ['rockylinux8', 'ubuntu2204', 'debian12']
scenario: ['carbonapi']
scenario: ['carbonapi', 'go-carbon']

steps:
- name: Checkout code
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Lint](https://github.com/tbauriedel/ansible-collection-gographite/actions/workflows/linting.yml/badge.svg)
![Molecule](https://github.com/tbauriedel/ansible-collection-gographite/actions/workflows/molecule.yml/badge.svg)

# ansible-role-gographite

Expand Down
9 changes: 9 additions & 0 deletions molecule/go-carbon/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Converge
hosts: all

collections:
- tbauriedel.gographite

roles:
- go-carbon
18 changes: 18 additions & 0 deletions molecule/go-carbon/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: go-carbon
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true
provisioner:
name: ansible
verifier:
name: ansible
8 changes: 8 additions & 0 deletions molecule/go-carbon/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: Verify
hosts: all
tasks:
- name: Ensure service is running
ansible.builtin.service:
name: go-carbon
state: started
1 change: 1 addition & 0 deletions roles/go-carbon/tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ansible.builtin.dnf:
name: "{{ _fetched_source.dest }}"
state: present
disable_gpg_check: true
when: ansible_os_family == 'RedHat'

- name: Ensure storage-dir exists
Expand Down

0 comments on commit 18e8b7b

Please sign in to comment.