Environment variables can no longer be be passed to the verifier since Molecule 6
boutetnico opened this issue · 3 comments
boutetnico commented
Issue Type
- Bug report
Molecule and Ansible details
ansible --version && molecule --version
ansible [core 2.15.3]
config file = None
configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/hostedtoolcache/Python/3.11.4/x64/bin/ansible
python version = 3.11.4 (main, Jun 7 [20](https://github.com/boutetnico/molecule-6-broken-env/actions/runs/5865269114/job/15901845920#step:6:21)[23](https://github.com/boutetnico/molecule-6-broken-env/actions/runs/5865269114/job/15901845920#step:6:24), 11:01:02) [GCC 11.3.0] (/opt/hostedtoolcache/Python/3.11.4/x64/bin/python)
jinja version = 3.1.2
libyaml = True
molecule 5.1.0 using python 3.11
ansible:2.15.3
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
Molecule installation method (one of):
- pip
Ansible installation method (one of):
- pip
Detail any linters or test runners used:
Desired Behavior
Prior to Molecule 6 and as stated in Molecule documentation, it should be possible to pass env vars to the verifier:
Actual Behaviour
The env var is no longer passed to the verifier.
I have created a test repo with a a GitHub action running both molecule 5 (working) and 6 (failing during verify) to make it easy to reproduce.
jpodivin commented
I have the same issue with the MOLECULE_INVENTORY_FILE
variable.
zhan9san commented
Thanks for reporting this issue.
I'll submit a PR fixing it.
It's introduced in https://github.com/ansible/molecule/pull/3958/files#diff-484e298af273a464276755e85baba0628e876f99d4fa6b3488cf269d344a1b30L159