Replies: 2 comments 1 reply
-
Issue is coming from JSON schema validation. You can disable it by commenting line 461 in src/molecule/config.py file like so: if errors:
msg = f"Failed to validate {self.molecule_file}\n\n{errors}"
# util.sysexit_with_message(msg) This has to be done in your local molecule installation. This is an issue in molecule from my POV, it has rigid JSON schema that does not allow any unexpected parameters. You can try disabling JSON schema check as it is easily reversible. Basically everything that is not mentioned in the schema |
Beta Was this translation helpful? Give feedback.
-
@kksat |
Beta Was this translation helpful? Give feedback.
-
So I'm trying to use molecule to test the build of a RHEL 8 AMI
In order to accomplish this task I am trying to retrofit the code the previous worked to build a RHEL 7 AMI
The current problem I'm having is that when I try to run the molecule script it complains that the 'name' variable is unexpected.
`WARNING The scenario config file ('/home/joe/Programming/redacted-base-ami-rhel8/ansible/roles/redacted_base.tests/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
DEBUG Validating schema /home/joe/Programming/redacted-base-ami-rhel8/ansible/roles/redacted_base.tests/molecule/default/molecule.yml.
CRITICAL Failed to validate /home/joe/Programming/redacted-base-ami-rhel8/ansible/roles/redacted_base.tests/molecule/default/molecule.yml
["Additional properties are not allowed ('name' was unexpected)"]
`
What boggles my mind is that the molecule output doesn't display any line number for the 'name' variable.
Is there a way to up the verbosity and debugging of molecule so that I get more output such as the line number?
Here are a list of things that I have tried so far
[defaults]
enable_task_debugger = True
debugger: on_failed
Any ideas of what I can try are appreciated.
Beta Was this translation helpful? Give feedback.
All reactions