Add Molecule scaffolding
This commit is contained in:
@@ -199,6 +199,7 @@ Use `inventory_example.yml`, `inventory_libvirt_example.yml`, `vars_example.yml`
|
|||||||
- `vm_dns` and `vm_dns_search` accept comma-separated strings or YAML lists.
|
- `vm_dns` and `vm_dns_search` accept comma-separated strings or YAML lists.
|
||||||
- `hypervisor` determines which backend-specific roles run.
|
- `hypervisor` determines which backend-specific roles run.
|
||||||
- Guest tools are installed based on `hypervisor`: `qemu-guest-agent` for `libvirt`/`proxmox`, `open-vm-tools` for `vmware`, otherwise none.
|
- Guest tools are installed based on `hypervisor`: `qemu-guest-agent` for `libvirt`/`proxmox`, `open-vm-tools` for `vmware`, otherwise none.
|
||||||
|
- Molecule is scaffolded with a delegated driver and a no-op converge for lint-only validation.
|
||||||
- With LUKS enabled on Debian/Ubuntu and RHEL-based systems, provisioning uses an ESP (50 MiB), a separate `/boot`
|
- With LUKS enabled on Debian/Ubuntu and RHEL-based systems, provisioning uses an ESP (50 MiB), a separate `/boot`
|
||||||
(1 GiB, same as `filesystem` unless `btrfs` uses ext4 on Debian/Ubuntu or xfs on RHEL-based), and the encrypted root;
|
(1 GiB, same as `filesystem` unless `btrfs` uses ext4 on Debian/Ubuntu or xfs on RHEL-based), and the encrypted root;
|
||||||
adjust sizes via
|
adjust sizes via
|
||||||
|
|||||||
8
molecule/default/converge.yml
Normal file
8
molecule/default/converge.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: Molecule converge placeholder
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Skip destructive provisioning in Molecule
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "Molecule scenario is lint-only; run main.yml against disposable hosts."
|
||||||
19
molecule/default/molecule.yml
Normal file
19
molecule/default/molecule.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
dependency:
|
||||||
|
name: galaxy
|
||||||
|
driver:
|
||||||
|
name: delegated
|
||||||
|
platforms:
|
||||||
|
- name: localhost
|
||||||
|
provisioner:
|
||||||
|
name: ansible
|
||||||
|
playbooks:
|
||||||
|
converge: converge.yml
|
||||||
|
inventory:
|
||||||
|
host_vars:
|
||||||
|
localhost:
|
||||||
|
ansible_connection: local
|
||||||
|
lint:
|
||||||
|
name: ansible-lint
|
||||||
|
verifier:
|
||||||
|
name: ansible
|
||||||
9
molecule/default/verify.yml
Normal file
9
molecule/default/verify.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: Molecule verify placeholder
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Verify placeholder
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- true
|
||||||
Reference in New Issue
Block a user