Skip to main content

Questions tagged [molecule]

Use this tag if a question is about Molecule, i.e. a test framework for Ansible.

-1 votes
1 answer
673 views

How to access hostvars from goss test with molecule

I have a molecule scenario that creates 3 docker instances, each having a different configuration from the same role. The three communicates with each other as I put the instances IP addresses in ...
Christophe Drevet's user avatar
4 votes
1 answer
1k views

How to share variables across instances?

I'm writing TestInfra test scripts for mongo cluster instances using Molecule Ansible. I want to share variables across all the instances. I created a python class, and initialise and update the ...
Abel's user avatar
  • 141
5 votes
1 answer
1k views

Is there any way of getting code coverage with molecule?

I'm currently working on testing Ansible roles with Molecule. I have one role with 2 scenarios that are executed in Jenkins but just before that, those are submitted to a SonarQube analysis. So I ...
Yoiro's user avatar
  • 151
2 votes
1 answer
2k views

How to test an ansible playbook using molecule inside docker locally?

When molecule is run on travis, the build is successful: $ molecule test --> Validating schema /home/travis/build/030/ansible-firefox/molecule/default/molecule.yml. Validation completed ...
030's user avatar
  • 13.2k
1 vote
1 answer
2k views

How to exclude a certain linenumber of an Ansible playbook when testing it using Molecule?

The aim is to exclude a certain line that contains a checksum and cannot be smaller than 80 characters. --> Scenario: 'default' --> Action: 'lint' --> Executing Yamllint on files found in /...
030's user avatar
  • 13.2k