Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables can no longer be be passed to the verifier since Molecule 6 #4011

Closed
boutetnico opened this issue Aug 15, 2023 · 3 comments
Labels

Comments

@boutetnico
Copy link

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:
Screenshot 2023-08-15 at 10 41 12 AM

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.

@boutetnico boutetnico added the bug label Aug 15, 2023
@jpodivin
Copy link

I have the same issue with the MOLECULE_INVENTORY_FILE variable.

@zhan9san
Copy link
Contributor

zhan9san commented Aug 15, 2023

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

audgirka pushed a commit that referenced this issue Aug 16, 2023
Related to #4011

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@cidrblock
Copy link
Contributor

Closed by #4014 in v6.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants