Skip to content

feat: comprehensive project modernization and remove docker swarm support#1

Merged
igobranco merged 12 commits intomasterfrom
igobranco/remove-swarm
Jan 30, 2026
Merged

feat: comprehensive project modernization and remove docker swarm support#1
igobranco merged 12 commits intomasterfrom
igobranco/remove-swarm

Conversation

@igobranco
Copy link
Member

feat!: remove docker swarm/stack support


feat!: comprehensive project modernization and doc

  • Add GitHub Actions CI/CD pipeline with multi-version testing
  • Replace Travis CI with GitHub Actions workflows
  • Add comprehensive test suite (compose, files/templates, secrets/configs)
  • Implement Molecule testing framework
  • Add development tooling (Makefile, test runner, requirements files)
  • Create issue templates and PR template
  • Add yamllint and ansible-lint configurations
  • Enhance README with extensive examples and better organization
  • Add CONTRIBUTING.md, QUICKSTART.md, and CHANGELOG.md
  • Remove Docker Swarm support, focus on Compose-only
  • Update to use community.docker.docker_compose_v2 module
  • Fix YAML formatting and whitespace inconsistencies
  • Add helper development files (.ansible-lint, .yamllint)

Breaking Changes:

  • Docker Swarm/Stack support removed

This update significantly improves the project's maintainability, testing
infrastructure, and documentation while modernizing the codebase for
current Docker Compose best practices.

- Add GitHub Actions CI/CD pipeline with multi-version testing
- Replace Travis CI with GitHub Actions workflows
- Add comprehensive test suite (compose, files/templates, secrets/configs)
- Implement Molecule testing framework
- Add development tooling (Makefile, test runner, requirements files)
- Create issue templates and PR template
- Add yamllint and ansible-lint configurations
- Enhance README with extensive examples and better organization
- Add CONTRIBUTING.md, QUICKSTART.md, and CHANGELOG.md
- Remove Docker Swarm support, focus on Compose-only
- Update to use community.docker.docker_compose_v2 module
- Fix YAML formatting and whitespace inconsistencies
- Add helper development files (.ansible-lint, .yamllint)

Breaking Changes:
- Docker Swarm/Stack support removed

This update significantly improves the project's maintainability, testing
infrastructure, and documentation while modernizing the codebase for
current Docker Compose best practices.
@igobranco igobranco self-assigned this Jan 26, 2026
Major improvements to testing infrastructure and CI/CD pipeline:

Testing Infrastructure:
- Add Docker-based testing with Dockerfile.test for isolated version testing
- Add docker-test.sh script with color output for managing Docker tests
- Add parallel test execution support with Make -j flag
- Support Ansible versions 4-9 and latest across Python 3.8-3.12
- Implement virtual environment testing with version-specific targets
- Add Python/Ansible compatibility detection and automatic version skipping

CI/CD Improvements:
- Fix Ansible version testing in GitHub Actions workflow
- Replace non-existent Ansible 2.10-2.15 with correct versions 4-9
- Add Python 3.8 for Ansible 2.9 compatibility
- Update version installation syntax to use ansible~=X.0 format
- Add matrix includes/excludes for proper Python version pairing

Makefile Enhancements:
- Add test-all-versions target for virtual environment testing
- Add docker-test-all target for Docker-based testing
- Add individual version targets (test-ansible-4 through 9)
- Add parallel execution targets (*-parallel) for faster testing
- Add docker-clean and clean-venvs cleanup targets
- Add version-specific Docker test targets for parallel execution
- Implement Python version detection to skip incompatible combinations

Build Optimizations:
- Optimize Docker build with layer caching (install before copy)
- Add error handling for collection installation failures
- Fix role path structure in Docker containers (/roles/ansible-docker-deploy)
- Use multi-stage builds for each Ansible version

Documentation Updates:
- Add comprehensive testing section in README.md
- Add Python/Ansible compatibility matrix
- Add Docker and parallel testing examples in CONTRIBUTING.md
- Add quick testing examples in QUICKSTART.md
- Document both Docker and virtual environment testing approaches
- Add performance tips for parallel execution

Other Changes:
- Add venv-* pattern to .gitignore for version-specific environments
- Update setup target to install Ansible collections
- Add requirements.yml installation to test workflows

This enables developers to easily test across all Ansible versions using
either Docker (no local Ansible install needed) or virtual environments,
with significant speed improvements through parallel execution.
Update CI and molecule configurations.
update Docker commands to use 'docker compose'.
…2 tests

This commit addresses a critical bug in docker_compose_v2 deployment and
adds comprehensive test coverage for the module mode.

Bug Fix:
- Fixed docker_compose_v2 task using 'state: restarted' which failed to
  create new containers on first deployment
- Changed to 'state: present' with dynamic 'recreate: always' when changes
  are detected (compose file, templates, files, or git repositories)
- Now properly creates containers on initial deployment and recreates them
  when configuration changes

New Tests:
- tests/test-compose-v2.yml: Basic Docker Compose deployment with
  docker_compose_v2 module (port 18080)
- tests/test-files-templates-v2.yml: File copying and template rendering
  with docker_compose_v2 mode
- tests/test-secrets-configs-v2.yml: Docker secrets/configs functionality
  with docker_compose_v2 mode and checksum validation

Test Infrastructure:
- Updated Makefile with 6 test targets: 3 shell mode + 3 docker_compose_v2
- Added test-compose-v2, test-files-v2, test-secrets-v2 targets
- Updated README.md with comprehensive documentation for both test modes
- All 6 tests now passing (shell and docker_compose_v2 modes)

The role now supports and tests both deployment modes:
1. Shell mode (docker_deploy_shell: true) - uses docker compose CLI
2. Module mode (default) - uses community.docker.docker_compose_v2
@igobranco igobranco merged commit fc9329c into master Jan 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant