-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80d588b
commit ea8ece9
Showing
13 changed files
with
819 additions
and
702 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file contains ignores rule violations for ansible-lint | ||
meta/main.yml schema[meta] | ||
molecule/default/verify.yml no-changed-when | ||
requirements.yml schema[requirements] | ||
tasks/main.yml no-handler |
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
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,5 @@ | ||
fileignoreconfig: | ||
- filename: poetry.lock | ||
ignore_detectors: [filecontent] | ||
- filename: .github/workflows/release.yml | ||
ignore_detectors: [filecontent] |
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,2 +1,52 @@ | ||
molecule: | ||
molecule test | ||
.PHONY: all ${MAKECMDGOALS} | ||
|
||
MOLECULE_SCENARIO ?= default | ||
MOLECULE_DOCKER_IMAGE ?= ubuntu2004 | ||
GALAXY_API_KEY ?= | ||
GITHUB_REPOSITORY ?= $$(git config --get remote.origin.url | cut -d: -f 2 | cut -d. -f 1) | ||
GITHUB_ORG = $$(echo ${GITHUB_REPOSITORY} | cut -d/ -f 1) | ||
GITHUB_REPO = $$(echo ${GITHUB_REPOSITORY} | cut -d/ -f 2) | ||
REQUIREMENTS = requirements.yml | ||
|
||
all: install version lint test | ||
|
||
install: | ||
@type poetry >/dev/null || pip3 install poetry | ||
@poetry install | ||
|
||
lint: install | ||
poetry run yamllint . | ||
poetry run ansible-lint . | ||
poetry run molecule syntax | ||
|
||
roles: | ||
[ -f ${REQUIREMENTS} ] && yq '.$@[] | .name' -r < ${REQUIREMENTS} \ | ||
| xargs -L1 poetry run ansible-galaxy role install --force || exit 0 | ||
|
||
collections: | ||
[ -f ${REQUIREMENTS} ] && yq '.$@[]' -r < ${REQUIREMENTS} \ | ||
| xargs -L1 echo poetry run ansible-galaxy -vvv collection install --force || exit 0 | ||
|
||
requirements: roles collections | ||
|
||
dependency create prepare converge idempotence side-effect verify destroy login reset: | ||
MOLECULE_DOCKER_IMAGE=${MOLECULE_DOCKER_IMAGE} poetry run molecule $@ -s ${MOLECULE_SCENARIO} | ||
|
||
ignore: | ||
poetry run ansible-lint --generate-ignore | ||
|
||
clean: destroy reset | ||
@poetry env remove $$(which python) >/dev/null 2>&1 || exit 0 | ||
|
||
publish: | ||
@echo publishing repository ${GITHUB_REPOSITORY} | ||
@echo GITHUB_ORGANIZATION=${GITHUB_ORG} | ||
@echo GITHUB_REPOSITORY=${GITHUB_REPO} | ||
@poetry run ansible-galaxy role import \ | ||
--api-key ${GALAXY_API_KEY} ${GITHUB_ORG} ${GITHUB_REPO} | ||
|
||
version: | ||
@poetry run molecule --version | ||
|
||
debug: version | ||
@poetry export --dev --without-hashes |
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
Oops, something went wrong.