ansible-community / molecule-plugins

Collection on molecule plugins
MIT License
114 stars 76 forks source link

Podman - Usage of "ansible.builtin.getent" not supported on OS X #183

Closed jorneilander closed 1 year ago

jorneilander commented 1 year ago

LS,

Since v23.5.0 the usage of "ansible.builtin.getent" has been introduced into create.yml. The known issue with this module is that it's not supported under OS X:

PLAY [Create] ******************************************************************

TASK [Get podman executable path] **********************************************
ok: [localhost]

TASK [Register podman executable path] *****************************************
ok: [localhost]

TASK [Get passwd entries for USER env] *****************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"getent\" in paths: <list>"}

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Reverting to v23.4.1 does work.

[...]
TASK [Create podman network dedicated to this scenario] ************************
skipping: [localhost]

TASK [Create molecule instance(s)] *********************************************
changed: [localhost] => (item=instance)

TASK [Wait for instance(s) creation to complete] *******************************
FAILED - RETRYING: [localhost]: Wait for instance(s) creation to complete (300 retries left).
FAILED - RETRYING: [localhost]: Wait for instance(s) creation to complete (299 retries left).
FAILED - RETRYING: [localhost]: Wait for instance(s) creation to complete (298 retries left).
changed: [localhost] => (item=instance)

PLAY RECAP *********************************************************************
localhost                  : ok=9    changed=3    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0

Context information:

❯ ansible --version
ansible [core 2.15.2]
  config file = None
  configured module search path = ['<home>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = <home>/Documents/molecule/.venv/lib/python3.11/site-packages/ansible
  ansible collection location = <home>/.ansible/collections:/usr/share/ansible/collections
  executable location = <home>/Documents/molecule/.venv/bin/ansible
  python version = 3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)] (<home>/Documents/molecule/.venv/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True

❯ molecule --version
molecule 5.1.0 using python 3.11 
    ansible:2.15.2
    azure:23.5.0 from molecule_plugins
    containers:23.5.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
    delegated:5.1.0 from molecule
    docker:23.5.0 from molecule_plugins requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0
    ec2:23.5.0 from molecule_plugins
    gce:23.5.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
    podman:23.5.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
    vagrant:23.5.0 from molecule_plugins
dhoppe commented 1 year ago

This is related to #173.

dbrennand commented 1 year ago

Just ran into this issue, thanks @jorneilander for the reverting solution. Looks like the upstream issue has been closed? https://github.com/ansible/ansible/issues/38339

zhan9san commented 1 year ago

Duplicate, #181 It is addressed in #182