-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more quick default role tests icingadb_redis
- Loading branch information
1 parent
5c976ce
commit a586add
Showing
10 changed files
with
142 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
# These Jobs should be always be run against the latest version of ansible on the systems | ||
# Feel free to update python and ansible versions | ||
# | ||
# In addition to keep them quick and no additional variables are used. | ||
# | ||
name: role-icingadb_redis | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'feature/**' | ||
- 'fix/**' | ||
- '!doc/**' | ||
paths: | ||
- roles/icingadb_redis/** | ||
- molecule/role-icingadb_redis/** | ||
pull_request: | ||
branches: | ||
- 'feature/**' | ||
- 'fix/**' | ||
- '!doc/**' | ||
|
||
jobs: | ||
icingadb_redis-ubuntu2204-latest: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
COLLECTION_NAMESPACE: icinga | ||
COLLECTION_NAME: icinga | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
distro: [ubuntu2204] | ||
python: ['3.10'] | ||
ansible: ['2.16.2'] | ||
scenario: [role-icingadb_redis] | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install dependencies ansible | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements-test-${{ matrix.ansible }}.txt | ||
- name: Install collection | ||
run: | | ||
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE | ||
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME | ||
- name: Test with molecule | ||
run: | | ||
ansible --version | ||
molecule --version | ||
molecule test -s ${{ matrix.scenario }} | ||
env: | ||
MOLECULE_DISTRO: ${{ matrix.distro }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
collections: | ||
- name: community.mysql | ||
- name: community.docker | ||
- name: community.general | ||
version: ">=2,<3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
|
||
- name: Converge | ||
hosts: all | ||
collections: | ||
- icinga.icinga | ||
pre_tasks: | ||
- ansible.builtin.include_role: | ||
name: repos | ||
post_tasks: | ||
- ansible.builtin.include_role: | ||
name: icingadb_redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: requirements.yml |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: icingadb_redis-default | ||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest" | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
cgroupns_mode: host | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
inventory: | ||
link: | ||
host_vars: host_vars/ | ||
verifier: | ||
name: testinfra | ||
directory: tests/integration/ | ||
lint: | | ||
set -e | ||
yamllint --no-warnings roles/ | ||
ansible-lint roles/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
tasks: | ||
- name: Install requirements for Debian | ||
apt: | ||
name: | ||
- gpg | ||
- apt-transport-https | ||
update_cache: yes | ||
when: ansible_os_family == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
roles: | ||
- geerlingguy.mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
- name: Verify | ||
hosts: all | ||
tasks: | ||
- name: Check for running icinga2 | ||
service: | ||
name: icinga2 | ||
state: started |