Some checks failed
Test Collection / Sanity Tests (Ansible devel) (push) Failing after 12s
Test Collection / Sanity Tests (Ansible stable-2.15) (push) Failing after 29s
Test Collection / Sanity Tests (Ansible stable-2.16) (push) Failing after 29s
Test Collection / Documentation Check (push) Successful in 7s
Test Collection / Unit Tests (push) Successful in 7s
Test Collection / Sanity Tests (Ansible stable-2.17) (push) Failing after 27s
Test Collection / Python Syntax Check (push) Successful in 6s
Test Collection / Build Collection (push) Failing after 8s
Test Collection / YAML and Ansible Lint (push) Successful in 11s
Gitea Actions CI/CD
This collection includes automated testing and publishing workflows using Gitea Actions.
Workflows
Test Workflow (.gitea/workflows/test.yml)
Automatically runs on push and pull requests to main/master/develop branches.
Jobs:
- Sanity Tests - Runs ansible-test sanity checks across multiple Ansible versions (2.15, 2.16, 2.17, devel)
- Python Syntax Check - Validates Python syntax for all module files
- Build Collection - Builds the collection tarball and verifies contents
- YAML/Ansible Lint - Runs yamllint and ansible-lint (non-blocking)
- Documentation Check - Validates module documentation can be parsed
- Unit Tests - Runs unit tests when available (non-blocking)
Trigger manually:
git push origin main
# Or create a pull request
Publish Workflow (.gitea/workflows/publish.yml)
Publishes the collection to Ansible Galaxy.
Triggers:
- Automatically on GitHub/Gitea release
- Manually via workflow dispatch
Setup:
- Generate an API token from Ansible Galaxy
- Add the token as a secret in your repository:
- Go to repository Settings → Secrets
- Add new secret:
GALAXY_API_TOKEN - Paste your Galaxy API token
Manual trigger:
- Go to Actions tab
- Select "Publish to Galaxy" workflow
- Click "Run workflow"
- Enter version number (e.g., 1.0.0)
Running Tests Locally
Python Syntax Check
python -m py_compile plugins/modules/nsupdate_zone.py
python -m py_compile plugins/module_utils/deps.py
Build Collection
ansible-galaxy collection build
Sanity Tests
# Setup collection path structure
mkdir -p ansible_collections/valid
ln -s $(pwd) ansible_collections/valid/nsupdate_zone
cd ansible_collections/valid/nsupdate_zone
# Run sanity tests
ansible-test sanity --docker
YAML Lint
pip install yamllint
yamllint .
Ansible Lint
pip install ansible-lint
ansible-lint
Workflow Status
Add a badge to your README:

Troubleshooting
Sanity Tests Fail
- Ensure all Python files have correct syntax
- Check that DOCUMENTATION, EXAMPLES, and RETURNS are valid YAML
- Verify module follows Ansible module development guidelines
Build Fails
- Check
galaxy.ymlis valid - Ensure all required files are present
- Verify file permissions are correct
Publish Fails
- Verify
GALAXY_API_TOKENsecret is set correctly - Check that version in
galaxy.ymlis incremented - Ensure no version conflicts on Galaxy
Required Secrets
For the publish workflow to work, configure this secret in your repository:
GALAXY_API_TOKEN- Your Ansible Galaxy API token
Supported Ansible Versions
The CI tests against:
- Ansible 2.15 (stable)
- Ansible 2.16 (stable)
- Ansible 2.17 (stable)
- Ansible devel (latest development version)