Use this tag if a question is about Molecule, i.e. a test framework for Ansible.
Questions tagged [molecule]
5 questions
5
votes
1 answer
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 installed the YAML plugin for it to recognize the…
Yoiro
- 151
- 3
4
votes
1 answer
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 variables. Every time molecule verify, each test will…
Abel
- 141
- 2
2
votes
1 answer
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 successfully.
--> Test matrix
└── default
├── lint
├──…
030
- 13,383
- 17
- 76
- 178
1
vote
1 answer
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 /tmp/ansible-firefox/...
…
030
- 13,383
- 17
- 76
- 178
-1
votes
1 answer
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 their respective configuration files.
I need to test…
Christophe Drevet
- 99
- 3