Skip to content

Commit

Permalink
Update project dependencies (#16)
Browse files Browse the repository at this point in the history
* Update project dependencies

* Rename delegated driver to default
  • Loading branch information
teddyphreak authored Oct 3, 2023
1 parent 0d14fa2 commit 88f73fd
Show file tree
Hide file tree
Showing 7 changed files with 701 additions and 761 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file contains ignores rule violations for ansible-lint
meta/main.yml schema[meta]
3 changes: 3 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: Install dependencies
run: make install

- name: Debug test environment
run: make debug

- name: Run Molecule tests.
run: make test
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
run: make publish
env:
GALAXY_API_KEY: "${{ secrets.GALAXY_API_KEY }}"
GITHUB_ACTION_REPOSITORY: "${{ github.action_repository }}"
GITHUB_REPOSITORY: "${{ github.repository }}"
31 changes: 21 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
.PHONY: install lint test create prepare converge idempotence side-effect verify destroy reset login clean
.PHONY: all ${MAKECMDGOALS}

MOLECULE_SCENARIO ?= default
MOLECULE_DOCKER_IMAGE ?= ubuntu2004
GALAXY_API_KEY ?=
GITHUB_ACTION_REPOSITORY ?= $$(git config --get remote.origin.url | cut -d: -f 2 | cut -d. -f 1)
GITHUB_ORGANIZATION = $$(echo ${GITHUB_ACTION_REPOSITORY} | cut -d/ -f 1)
GITHUB_REPOSITORY = $$(echo ${GITHUB_ACTION_REPOSITORY} | cut -d/ -f 2)
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)

all: install version lint test

test: lint
poetry run molecule test -s ${MOLECULE_SCENARIO}

install:
@type poetry >/dev/null || pip3 install poetry
Expand All @@ -17,15 +22,21 @@ lint: install
poetry run ansible-lint .
poetry run molecule syntax

test: lint
poetry run molecule test -s ${MOLECULE_SCENARIO}

create prepare converge idempotence side-effect verify destroy login reset:
dependency create prepare converge idempotence side-effect verify destroy login reset:
MOLECULE_DOCKER_IMAGE=${MOLECULE_DOCKER_IMAGE} poetry run molecule $@ -s ${MOLECULE_SCENARIO}

clean: destroy reset
poetry env remove $$(which python)

publish:
@echo publishing repository ${GITHUB_ORGANIZATION}/${GITHUB_REPOSITORY}
@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_ORGANIZATION} ${GITHUB_REPOSITORY}
--api-key ${GALAXY_API_KEY} ${GITHUB_ORG} ${GITHUB_REPO}

version:
@poetry run molecule --version

debug: version
@poetry export --dev --without-hashes
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependency:
role-file: ${MOLECULE_PROJECT_DIRECTORY}//requirements.yml
requirements-file: ${MOLECULE_PROJECT_DIRECTORY}/requirements.yml
driver:
name: delegated
name: default
options:
managed: false
ansible_connection_options:
Expand Down
1,416 changes: 670 additions & 746 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ readme = "README.md"
python = "^3.11"

[tool.poetry.group.dev.dependencies]
ansible = "^8.2.0"
ansible = "^8.4.0"
ansible-lint = { version = "*", markers = "platform_system != 'Windows'" }
libvirt-python = "^9.5.0"
molecule = "^5.1.0"
libvirt-python = "^9.8.0"
netaddr = "^0.9.0"
molecule = "^6.0.2"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 88f73fd

Please sign in to comment.