This tutorial requires a working local LXD environment. Learn how to set up one in the requirements section of the docs.
Install the molecule LXD plugin:
pip install git+https://github.com/nextlayer-ansible/molecule-lxd.git@main#egg=molecule-lxdCreate a new role my-role with a molecule default scenario using the lxd driver:
molecule init role -d lxd my-roleCreate a molecule default scenario using the lxd driver:
molecule init scenario -d lxdHere's a simple molecule.yml example scenario definition, if you want to add it by hand:
driver:
name: lxd
platforms:
- name: instance
source_alias: ubuntu/jammy/amd64
provisioner:
name: ansible
verifier:
name: ansibleAfter configuration, you can run molecule:
molecule testMore examples can be found in the example section.