-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Without this, we would still test two different requirements, a very old 2.10, and a relatively new ansible. There is no reason to maintain the 2.10 testing framework, we can simply modernize the whole system. This allowed us to bump ansible-lint, and adopt the new lint recommendations, which are adapted here. I now also moved back to use Vagrant again, since the molecule docker is AGAIN broken. Fixes: #271
- Loading branch information
Showing
29 changed files
with
518 additions
and
320 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
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
--- | ||
name: Test | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# not running molecule_basic in CI due to lack of support | ||
# of macos image with nested virt + vagrant | ||
tox: ["lint", "molecule_default"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: docker-container | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install tox | ||
- name: Test using tox | ||
run: | | ||
sudo -H -E tox -e ${{ matrix.tox }} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.retry | ||
*.log | ||
.vagrant/ | ||
.ansible |
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,57 @@ | ||
# How to contribute to this | ||
|
||
We welcome all contributions. | ||
|
||
Main areas we need: | ||
- Expose the newest features of keepalived into the template, by editing them in the template. | ||
Please make sure your changes do NOT impact other user's templates! | ||
we do not want keepalived to restart for no reason. | ||
|
||
- Declare yourself as maintainer of a sub-part of the template. | ||
We are welcoming ppl using keepalived to be part of something they do care about! | ||
If you feel a part of the template is important for you, please mention it in the PR. We would like you to become maintainer and be pinged should the template change. | ||
|
||
- Improve our CI. | ||
Make sure our CI is always working by checking the last builds, and fix them in case an issue arise. | ||
|
||
# Test requirements | ||
|
||
- Tox | ||
- Vagrant | ||
- Virtualbox | ||
|
||
We are back to vagrant and virtualbox after a while dealing with molecule docker, | ||
but having many flaky builds and issues. | ||
The interface is not stable, and I want something with very little maintainance. | ||
|
||
# Add test coverage | ||
|
||
Test coverage is not a goal in itself, basic testing is fine. | ||
|
||
However, we welcome the testing of new distributions (especially if you remove an old one at the same time). | ||
|
||
To do it, you need to do the following: | ||
- Edit the meta/main.yml to add the distro | ||
- Edit the molecule/basic/molecule.yml to add the vagrant box in need of testing. | ||
|
||
For other test coverage, like features, please make sure to add a new tox target, | ||
which calls for a different molecule scenario. | ||
|
||
# How to run a lint test | ||
|
||
Run `tox -e lint`. | ||
|
||
# How to run a functional test | ||
|
||
Run `tox -e functional`. | ||
Should the build fail, run `tox -e functional -- --destroy==never` to keep your vagrant box running. | ||
|
||
# Contributions that will be refused | ||
|
||
- Moving back to molecule[docker] | ||
- Moving back to vagrant and playbooks for testing without molecule | ||
- Moving to vagrant with another driver than the default | ||
|
||
# Contributions that will be accepted | ||
|
||
Changes which passes testing especially if they have an optional test included proving their behaviour, tested in github actions. |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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,17 @@ | ||
--- | ||
- name: Setup keepalived | ||
hosts: all | ||
remote_user: vagrant | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Define NIC to use for VRRP | ||
ansible.builtin.set_fact: | ||
vrrp_nic: "{{ (ansible_facts['interfaces'] | reject('equalto', 'lo') | sort)[-1] }}" | ||
vrrp_ip: 192.168.56.254/24 | ||
|
||
- name: Include keepalived scenario vars | ||
ansible.builtin.include_vars: ../../tests/molecule-basic-scenario-vars.yml | ||
- name: Include keepalived role | ||
ansible.builtin.include_role: | ||
name: evrardjp.keepalived |
Oops, something went wrong.