Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
- cron: '15 6 * * 4'
jobs:
kics:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
Expand Down
78 changes: 0 additions & 78 deletions .github/workflows/test_full_stack.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/test_linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt

- name: Install Ansible collections
run: |
ansible-galaxy collection install community.crypto community.general

- name: Lint code (yamllint).
run: |
yamllint .
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:

jobs:
sanity_ansible_18_19:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
Expand Down Expand Up @@ -158,7 +159,7 @@ jobs:
fail-fast: false
matrix:
distro:
- ubuntu2204
- debian13
scenario:
- plugins
release:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_role_beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:

jobs:
lint_beats:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: beats
Expand All @@ -40,12 +41,11 @@ jobs:
fail-fast: false
matrix:
distro:
- ubuntu2204
- debian13
scenario:
- beats_default
- beats_peculiar
release:
- 7
- 8
ansible_version:
- "ansible>=9.0,<10.0" #Correspond ansible-core>=2.16,<2.17
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test_role_elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:

jobs:
lint_elasticsearch:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: elasticsearch
Expand All @@ -40,14 +41,11 @@ jobs:
fail-fast: false
matrix:
distro:
- ubuntu2204
- debian13
scenario:
- elasticsearch_default
- elasticsearch_roles_calculation
- elasticsearch_cluster-oss
- elasticsearch_no-security
release:
- 7
- 8
ansible_version:
- "ansible-core>=2.19,<2.20" #Correspond ansible>=12.0,<13.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_role_kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:

jobs:
lint_kibana:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: kibana
Expand All @@ -41,11 +42,10 @@ jobs:
fail-fast: false
matrix:
distro:
- ubuntu2204
- debian13
scenario:
- kibana_default
release:
- 7
- 8
ansible_version:
- "ansible-core>=2.19,<2.20" #Correspond ansible>=12.0,<13.0
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test_role_logstash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:

jobs:
lint_logstash:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: logstash
Expand All @@ -40,13 +41,11 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [ubuntu2204]
distro: [debian13]
scenario:
- logstash_full_stack-oss
- logstash_specific_version
- logstash_pipelines
release:
- 7
- 8
ansible_version:
- "ansible-core>=2.19,<2.20" #Correspond ansible>=12.0,<13.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_role_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:

jobs:
lint_repos:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: repos
Expand All @@ -48,7 +49,6 @@ jobs:
- repos_default
- repos_oss
release:
- 7
- 8
ansible_version:
- "ansible-core>=2.19,<2.20" #Correspond ansible>=12.0,<13.0
Expand Down
59 changes: 57 additions & 2 deletions .github/workflows/test_roles_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ on:

jobs:
lint_full:
if: github.event.pull_request.draft == false
uses: ./.github/workflows/test_linting.yml
with:
rolename: ''

molecule_full_stack:
molecule_full_stack_ansible_19:
runs-on: ubuntu-latest
needs: lint_full

Expand All @@ -38,7 +39,6 @@ jobs:
scenario:
- elasticstack_default
release:
- 7
- 8
python_version:
- "3.11"
Expand Down Expand Up @@ -75,3 +75,58 @@ jobs:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
ELASTIC_RELEASE: ${{ matrix.release }}


molecule_full_stack_ansible_20:
runs-on: ubuntu-latest
needs: lint_full

env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
matrix:
distro:
- rockylinux9
- ubuntu2204
scenario:
- elasticstack_default
release:
- 8
python_version:
- "3.14"
ansible_version:
- "ansible-core>=2.20,<2.21" #Correspond ansible>=13.0,<14.0

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install "${{ matrix.ansible_version }}"
python3 -m pip install -r requirements-test.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 }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
ELASTIC_RELEASE: ${{ matrix.release }}
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Ansible Collection - netways.elasticstack

![Test ElasticStack](https://github.com/NETWAYS/ansible-collection-elasticstack/actions/workflows/test_full_stack.yml/badge.svg)

> [!CAUTION]
> The current main branch has some breaking changes. Be careful using it! Everything after commit 3d6673f6d526afeb0fd7ba382d067d76bd10bbd6 is affected!
Expand Down Expand Up @@ -65,16 +64,8 @@ You may want the following Ansible roles installed. There other ways to achieve
We test the collection on the following Linux distributions. Each one with Elastic Stack 7 and 8.

* Rocky Linux 9
* Rocky Linux 8
* Ubuntu 22.04 LTS
* Ubuntu 20.04 LTS
* Debian 11
* Debian 10
* CentOS 8

We know from personal experience, that the collections work in following combinations. Missing tests mostly come from incompatibilties between the distribution and our testing environment, not from problems with the collection itself.

* CentOS 7 - Elastic Stack 7
* Debian 13

## Caveats and information for long time users

Expand Down
2 changes: 2 additions & 0 deletions molecule/beats_default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ driver:
name: docker
platforms:
- name: beats_default_${MOLECULE_DISTRO:-debian13}
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian13}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
Expand Down
6 changes: 0 additions & 6 deletions molecule/beats_peculiar/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
elasticstack_release: "{{ lookup('env', 'ELASTIC_RELEASE') | int}}"
tasks:

- name: Set Filebeat version for 7.x
ansible.builtin.set_fact:
elasticstack_version: "7.17.1"
when:
- elasticstack_release == 7

- name: Set Filebeat version for 8.x
ansible.builtin.set_fact:
elasticstack_version: "8.4.1"
Expand Down
2 changes: 2 additions & 0 deletions molecule/beats_peculiar/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ driver:
name: docker
platforms:
- name: beats_peculiar_${MOLECULE_DISTRO:-debian13}
groups:
- elasticsearch
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian13}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
Expand Down
21 changes: 0 additions & 21 deletions molecule/elasticsearch_cluster-oss/converge.yml

This file was deleted.

Loading
Loading