Skip to content

Fix Molecule links in inventory#348

Merged
RanabirChakraborty merged 1 commit intoansible-middleware:mainfrom
hcherukuri:main
Mar 31, 2026
Merged

Fix Molecule links in inventory#348
RanabirChakraborty merged 1 commit intoansible-middleware:mainfrom
hcherukuri:main

Conversation

@hcherukuri
Copy link
Copy Markdown
Member

Fix Molecule links in inventory overrides inline group_vars/host_vars so all inline variable definitions were silently ignored.

@hcherukuri
Copy link
Copy Markdown
Member Author

@istraka has found an issue with the molecule tests vars. Please see the details below:

I found an problem in wildfly molecule tests:
    links:
      group_vars: ../group_varshttps://github.com/ansible-middleware/wildfly/blob/main/molecule/default/molecule.yml#L17
will override everything else.

For example
    group_vars:
      all:
        molecule_scenario_requires_app: truehttps://github.com/ansible-middleware/wildfly/blob/main/molecule/default/molecule.yml#L18
will have no effect

 instance-rhel9:
        wildfly_java_version: 17https://github.com/ansible-middleware/wildfly/blob/main/.config/molecule/config.yml#L39
will have no effect

I tested it and the values are not propagated.see. You can use either hosts/group_vars/host_vars sections of inventory OR links. If you use both, links will win.in https://docs.ansible.com/projects/molecule/configuration/ (edited) docs.ansible.comConfiguration - Ansible Molecule

@RanabirChakraborty
Copy link
Copy Markdown
Member

@hcherukuri this will work fine for this moment but when we'll upgrade the rhel version to rhel10 then we need jdk21 as default version as rhel10 doesn't have jdk17 and it'll cause issues. With this fix in future we'll try to pass for example jdk17 for rhel8,9,10 but for rhel10 this will work and then we need to come back to this logic or something separate to run diff rhel versions with diff jdk versions.

@hcherukuri
Copy link
Copy Markdown
Member Author

Thanks @RanabirChakraborty, i agree it might be a issue when we add RHEL 10. I will add the RHEL 10 scenario and test it out to see if this works.

@RanabirChakraborty
Copy link
Copy Markdown
Member

@hcherukuri thanks seems like it's working fine now with rhel10 , you can comment out the [rhel10 ](name: instance-rhel10) part and then we'll merge this PR.

…, so all inline variable definitions were silently ignored.
@hcherukuri
Copy link
Copy Markdown
Member Author

@RanabirChakraborty Done

Copy link
Copy Markdown
Member

@RanabirChakraborty RanabirChakraborty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RanabirChakraborty RanabirChakraborty added the minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix label Mar 31, 2026
@RanabirChakraborty RanabirChakraborty merged commit 5dfc774 into ansible-middleware:main Mar 31, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor_changes New parameters added to modules, or non-breaking behavior changes to existing parameters; no bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants