Questions tagged [molecule]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
493 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 ...
user avatar
2 votes
1 answer
522 views

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 ...
user avatar
  • 121
5 votes
1 answer
775 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 ...
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 ...
user avatar
  • 12.6k
1 vote
1 answer
1k 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 /...
user avatar
  • 12.6k