Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e76d240
test
afeefghannam89 Mar 18, 2026
91cbd14
test2
afeefghannam89 Mar 18, 2026
87dcb2f
test3
afeefghannam89 Mar 18, 2026
cb5dda4
Test 4
afeefghannam89 Mar 19, 2026
81ae8ca
test5
afeefghannam89 Mar 19, 2026
b220d01
test 6
afeefghannam89 Mar 19, 2026
13f36f6
test 7
afeefghannam89 Mar 19, 2026
5a34d29
test 8
afeefghannam89 Mar 19, 2026
62a6c77
Test 19
afeefghannam89 Mar 19, 2026
e67c82d
Test 20
afeefghannam89 Mar 19, 2026
06cb93e
test 21
afeefghannam89 Mar 19, 2026
272e95d
test 22
afeefghannam89 Mar 19, 2026
8076828
Test 23
afeefghannam89 Mar 19, 2026
72a58a5
Accept long lines in plugins
afeefghannam89 Mar 19, 2026
d958e99
Fix white spaces
afeefghannam89 Mar 19, 2026
f5d2faf
Fix comparison statement
afeefghannam89 Mar 19, 2026
7d9672a
Fix comparison statement
afeefghannam89 Mar 19, 2026
c007b87
Fix sapaces
afeefghannam89 Mar 19, 2026
fbc830c
Fix syntax errors in plugins
afeefghannam89 Mar 19, 2026
f8e04aa
Update runner version to latest
afeefghannam89 Mar 19, 2026
4e944e1
Add sanity test
afeefghannam89 Mar 19, 2026
a096973
Remove spaces
afeefghannam89 Mar 20, 2026
bf88243
Merge branch 'main' into feature/plugin-python-update
afeefghannam89 Mar 20, 2026
13c4ad4
Change needs
afeefghannam89 Mar 20, 2026
121b540
Merge branch 'feature/plugin-python-update' of github.com:NETWAYS/ans…
afeefghannam89 Mar 20, 2026
160aca8
Change directory for sanity test
afeefghannam89 Mar 20, 2026
806aeac
Add path
afeefghannam89 Mar 20, 2026
871c96f
Add better import error for modules
afeefghannam89 Mar 23, 2026
fc880e5
Use traceback module
afeefghannam89 Mar 23, 2026
23d6682
Do not use shebang in module unites
afeefghannam89 Mar 23, 2026
b9b8628
Fix E501 line too long
afeefghannam89 Mar 23, 2026
76f6289
Use ASCII quotes instead of Unicode quotes
afeefghannam89 Mar 23, 2026
eea4bfe
* private_key and additional_certs are extract but not
afeefghannam89 Mar 23, 2026
ba7e4d7
Add documentation for every module
afeefghannam89 Mar 23, 2026
69534f2
* _ ist not allowd in Ansible s wa varible name
afeefghannam89 Mar 23, 2026
d076d3d
* Remove the wronge documentation style
afeefghannam89 Mar 23, 2026
3248590
Update sanity test
afeefghannam89 Mar 23, 2026
42055cd
Correct the needs
afeefghannam89 Mar 23, 2026
4a05347
Add python path
afeefghannam89 Mar 23, 2026
be20196
Replace deprecated methon
afeefghannam89 Mar 23, 2026
e310197
Fix unit tests to work with ansible-core 2.19
afeefghannam89 Mar 23, 2026
e1534eb
Use up to date version in python kob
afeefghannam89 Mar 23, 2026
8ef4777
Fix spaces before class
afeefghannam89 Mar 24, 2026
2ca99f1
* Merge the elasticsearch_test_modules with plugin workflow
afeefghannam89 Mar 24, 2026
daff783
* Make the password and user in elasticsearch_user module
afeefghannam89 Mar 24, 2026
d79a11f
Reactivate test_roles_pr
afeefghannam89 Mar 24, 2026
bce2e7c
Use static ansible and python version
afeefghannam89 Mar 24, 2026
0f7af31
Use sensible cryptography version
afeefghannam89 Mar 24, 2026
dca2516
Correct the cryptography versions
afeefghannam89 Mar 24, 2026
c6db7f2
Update molecule/plugins/verify.yml
afeefghannam89 Mar 25, 2026
83d7844
Update molecule/plugins/verify.yml
afeefghannam89 Mar 25, 2026
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
4 changes: 0 additions & 4 deletions .config/pep8.cfg

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/test_elasticsearch_modules.yml

This file was deleted.

173 changes: 101 additions & 72 deletions .github/workflows/test_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,195 +14,224 @@ on:
- debug
pull_request:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
- 'main'
paths:
- 'plugins/**'
- '.github/workflows/test_plugins.yml'
- 'molecule/plugins/**'
- '.config/pep8.yml'
- 'tests/**'
- 'molecule/plugins/**'
- '.github/workflows/test_plugins.yml'

jobs:
pep8:
sanity_ansible_18_19:
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack
strategy:
fail-fast: false
matrix:
python_version:
- "3.11"
- "3.12"
- "3.13"
ansible_version:
- "ansible-core>=2.18,<2.19" #Correspond ansible>=11.0,<12.0
- "ansible-core>=2.19,<2.20" #Correspond ansible>=12.0,<13.0
steps:
- name: Check out the codebase.
- name: Check out code
uses: actions/checkout@v6

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

- name: Install test dependencies.
- name: Install Ansible
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pep8
python3 -m pip install "${{ matrix.ansible_version }}"

- name: Lint code.
- name: Install collection
run: |
pep8 plugins/ --config=.config/pep8.cfg --statistics --count
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME

unit-test:
needs: pep8
runs-on: ubuntu-20.04
- name: Run sanity tests
run: |
cd ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
ansible-test sanity --python "${{ matrix.python_version }}" -v
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

sanity_ansible_20:
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false

matrix:
python_version:
- "3.12"
- "3.13"
- "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 3.9.14
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v6
with:
python-version: 3.9.14
python-version: ${{ matrix.python_version }}

- name: Install dependencies
- name: Install Ansible
run: |
python -m pip install --upgrade pip
python -m pip install install ansible
python3 -m pip install --upgrade pip
python3 -m pip install "${{ matrix.ansible_version }}"

- 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 `cert_info` module
- name: Run sanity tests
run: |
python tests/unit/plugins/modules/test_cert_info.py
cd ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
ansible-test sanity --python "${{ matrix.python_version }}" -v
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

- name: Test `certs` module util
run: |
python tests/unit/plugins/module_utils/test_certs.py
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

python:
needs: unit-test
runs-on: ubuntu-20.04

unit-test:
needs:
- sanity_ansible_18_19
- sanity_ansible_20
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
matrix:
python_version: [ 3.5.10, 3.6.15, 3.7.13, 3.8.16, 3.10.10 ]

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

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install install ansible
python3 -m pip install --upgrade pip
python3 -m pip install "ansible-core>=2.19,<2.20"

- 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 ansible-playbook
- name: Test `cert_info` module
run: |
ansible-playbook molecule/plugins/converge.yml
PYTHONPATH=$HOME/.ansible/collections python3 tests/unit/plugins/modules/test_cert_info.py
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

ansible-core:
needs: python
runs-on: ubuntu-20.04
- name: Test `certs` module util
run: |
PYTHONPATH=$HOME/.ansible/collections python3 tests/unit/plugins/module_utils/test_certs.py
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'

molecule_plugins:
needs: unit-test
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
matrix:
ansible_core_version: [ 2.11.12, 2.12.10, 2.13.8, 2.14.4 ]

distro:
- ubuntu2204
scenario:
- plugins
release:
- 8
# - 9 # add when elasticsearch>=9 is supported by this collection
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Python 3.9.14
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: 3.9.14
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install install ansible-core==${{ matrix.ansible_core_version }}
python3 -m pip install --upgrade pip
python3 -m pip install "ansible-core>=2.19,<2.20"
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 ansible-playbook
- name: Test with molecule
run: |
ansible-playbook molecule/plugins/converge.yml
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 }}

python-cryptography:
needs: ansible-core
runs-on: ubuntu-20.04

needs: unit-test
runs-on: ubuntu-latest
env:
COLLECTION_NAMESPACE: netways
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
matrix:
python_cryptography_version: [ 2.5, 3.0, 3.1, 3.2, 3.3, 3.4, 35.0.0, 36.0.0, 38.0.0, 40.0.1]

python_cryptography_version:
- "3.4.8" # Test loading certificate with 3 parameter (old way).
- "41.0.7" # Last version before not_valid_after() and not_valid_before() deprecation.
- "42.0.0" # First release with deprecation https://cryptography.io/en/latest/changelog/
- "46.0.5" # Latest release
Comment thread
afeefghannam89 marked this conversation as resolved.
steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Python 3.9.14
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: 3.9.14
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install install cryptography==${{ matrix.python_cryptography_version }}
python -m pip install install ansible
python3 -m pip install --upgrade pip
python3 -m pip install "ansible-core>=2.19,<2.20"
python3 -m pip install "cryptography==${{ matrix.python_cryptography_version }}"

- 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 ansible-playbook
- name: Test cert_info with cryptography ${{ matrix.python_cryptography_version }}
run: |
ansible-playbook molecule/plugins/converge.yml
PYTHONPATH=$HOME/.ansible/collections python3 tests/unit/plugins/modules/test_cert_info.py
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
2 changes: 1 addition & 1 deletion docs/role-elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This variable activates a workaround to start on systems that have certain harde
* *elasticsearch_ssl_verification_mode*: Defines how to verify the certificates presented by another party in the TLS connection
* *elasticsearch_transport_port*: The port to bind for communication between nodes
* *elasticsearch_seed_hosts*: Set elasticsearch seed hosts
* *elasticsearch_security_enrollment*: Controls enrollment (of nodes and Kibana) to a local node thats been autoconfigured for security.
* *elasticsearch_security_enrollment*: Controls enrollment (of nodes and Kibana) to a local node that's been autoconfigured for security.

The following variable was only integrated to speed up upgrades of non-production clusters. Use with caution and at your own risk:

Expand Down
Loading
Loading