Skip to content

Commit

Permalink
molecule: Migrate to ansible-core with collections
Browse files Browse the repository at this point in the history
  • Loading branch information
ganto committed Jun 17, 2024
1 parent 98efbc2 commit 5675d11
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint ansible-lint[community]
run: pip3 install yamllint ansible-lint

- name: Install Ansible collections
run: ansible-galaxy install -r molecule/docker/collections.yml

- name: Add checkout to Ansible role path.
run: |
Expand Down
4 changes: 4 additions & 0 deletions molecule/docker/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.docker
- name: community.general
5 changes: 4 additions & 1 deletion molecule/docker/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

dependency:
name: galaxy
enabled: False
options:
requirements-file: collections.yml
driver:
name: docker
platforms:
Expand All @@ -25,6 +26,8 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
scenario:
test_sequence:
- dependency
- destroy
- syntax
- create
- prepare
Expand Down
2 changes: 1 addition & 1 deletion molecule/docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible
ansible-core
docker
molecule
molecule-plugins[docker]
4 changes: 4 additions & 0 deletions molecule/podman/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.general
- name: containers.podman
5 changes: 4 additions & 1 deletion molecule/podman/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

dependency:
name: galaxy
enabled: False
options:
requirements-file: collections.yml
driver:
name: podman
platforms:
Expand All @@ -24,6 +25,8 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
scenario:
test_sequence:
- dependency
- destroy
- syntax
- create
- prepare
Expand Down
2 changes: 1 addition & 1 deletion molecule/podman/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ansible
ansible-core
molecule
molecule-plugins[podman]

0 comments on commit 5675d11

Please sign in to comment.