I am trying to get molecule-plugins[podman] working with ansible-native inventory.
molecule.yml:
---
ansible:
cfg:
defaults:
deprecation_warnings: false
host_key_checking: false
env:
ANSIBLE_ROLES_PATH: ../../../playbooks/roles
ANSIBLE_INVENTORY: inventory/
executor:
args:
ansible_playbook:
- --inventory=inventory/
dependency:
name: galaxy
options:
requirements-file: ${MOLECULE_SCENARIO_DIRECTORY}/requirements.yml
scenario:
test_sequence:
- dependency
- destroy
- create
- converge
- idempotence
- verify
- cleanup
- destroy
hostsfile:
---
all:
children:
molecule:
hosts:
molecule-ubuntu2404:
container_image: docker.io/geerlingguy/docker-ubuntu2404-ansible
ansible_connection: podman
molecule-ubuntu2204:
container_image: docker.io/geerlingguy/docker-ubuntu2204-ansible
container_command: sleep 1d
container_privileged: false
ansible_connection: podman
The create/converge/… all works however list and login fails.
podman ps and List shows following:
⭐❯ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e8ceadf39dd docker.io/geerlingguy/docker-ubuntu2404-ansible:latest sleep 1d 11 days ago Up 34 minutes molecule-ubuntu2404
d79b3ff0e793 docker.io/geerlingguy/docker-ubuntu2204-ansible:latest sleep 1d 11 days ago Up 34 minutes molecule-ubuntu2204
⭐❯ molecule list -s default
INFO default ➜ list: Executing
INFO default ➜ list: Executed: Successful
╷ ╷ ╷ ╷ ╷
Instance Name │ Driver Name │ Provisioner Name │ Scenario Name │ Created │ Converged
╶───────────────┼─────────────┼──────────────────┼───────────────┼─────────┼───────────╴
│ default │ ansible │ default │ true │ false
╵ ╵ ╵ ╵ ╵
molecule login shows following:
⭐❯ molecule login -s default -h molecule-ubuntu2404
INFO default ➜ login: Executing
ERROR Unable to find host 'molecule-ubuntu2404'.
For more information: https://docs.ansible.com/projects/molecule/usage/#molecule-login
Am I missing elements? Am I doing anything wrong?