Molecule: Enabling roles dependencies

Molecule supports roles dependencies, however, we need to define the role-file parameter into the molecule.yml file to fetch the roles automatically. 1) Change the molecule.yml file according to the sample below. dependency: name: galaxy options: role-file: ${MOLECULE_SCENARIO_DIRECTORY}/requirements.yml2) Create a…

Keep reading

Molecule: How to define the vault password file.

Sometimes we have to deal with encrypted values, such as passwords and sensitive information inside the role, therefore for that case, we have to define the vault configuration for the molecule. The configuration for ansible vault key password file is defined within the file $HOME/…

Keep reading

Molecule: How to create a new role and change some default settings.

Creating new rolesRole with docker driver supportmolecule init role --role-name myrole --driver-name docker Role with vagrant driver supportmolecule init role --role-name myrole --driver-name vagrant Molecule settingsDocker (molecule.yml)Sample file with systemd suppport and port 8080 exposed. --- dependency: name: galaxy driver: name: docker lint:…

Keep reading

Molecule: How to use (part 2)

On this post, we gonna coverage some useful commands for molecule. Converge will execute the sequence necessary to converge the instances.$ molecule converge This action has cleanup and is not enabled by default. See the provisioner’s documentation for further details.$ molecule cleanup Destroy box/…

Keep reading

Molecule: How to install (part 1)

Molecule is designed to aid in the development and testing of Ansible roles.Molecule provides support for testing with multiple instances, operating systems and distributions, virtualization providers, test frameworks and testing scenarios.Molecule encourages an approach that results in consistently developed roles that are well-written,…

Keep reading