Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.04 KB

File metadata and controls

52 lines (38 loc) · 1.04 KB

Quickstart

This tutorial requires a working local LXD environment. Learn how to set up one in the requirements section of the docs.

Installation

Install the molecule LXD plugin:

pip install git+https://github.com/nextlayer-ansible/molecule-lxd.git@main#egg=molecule-lxd

Create a scenario

With a new role

Create a new role my-role with a molecule default scenario using the lxd driver:

molecule init role -d lxd my-role

In a pre-existing role

Create a molecule default scenario using the lxd driver:

molecule init scenario -d lxd

Example scenario definition

Here'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: ansible

Run tests

After configuration, you can run molecule:

molecule test

Further reading

More examples can be found in the example section.