rolecule is a simple tool to help you test your configuration management code works as you expect, by creating systemd enabled containers with either

GitHub - z0mbix/rolecule: Small, simple tool to test your configuration management roles/modules/recipes work as expected

submited by
Style Pass
2023-01-23 23:30:06

rolecule is a simple tool to help you test your configuration management code works as you expect, by creating systemd enabled containers with either docker or podman, then converging them with your configured provisioner (ansible by default). We're basically treating containers as mini VMs.

Once converged, it will run a verifier to test it all. Currently, the only supported provisioner is goss, testinfra will be added soon.

If you want to run a completely different ansible command, you can override the command and all the args with the command and args keys respectively, but if you just want to add other args like --diff or --verbose, add them to the extra_args array, e.g.:

Testing multiple architectures is support, but untested as I don't currently have an easy way to test it, but should be as simple as something like:

If you want to customise how goss validate is executed, you can change the gossfile and add extra arguments to the validate subcommand, e.g. with this in your rolecule.yml:

Leave a Comment