Files
k3s-ansible/molecule/default/molecule.yml
T
Timothy Stewart 4990157d35 fix(molecule): isolate default cluster network
- move the five-node cluster NICs to a named VirtualBox internal network
- preserve NAT connectivity for provisioning and downloads
- retain serialized creation and early neighbor identity validation
2026-08-01 12:27:12 -05:00

110 lines
2.7 KiB
YAML

---
dependency:
name: galaxy
driver:
name: vagrant
# The Vagrant driver warns that parallel VirtualBox creation can cause
# platform issues. Keep this five-node, mixed-distribution scenario serial.
parallel: false
platforms:
- name: control1
box: generic/ubuntu2204
memory: 1024
cpus: 2
groups:
- k3s_cluster
- master
interfaces:
- network_name: private_network
ip: 192.168.30.38
# Keep this cluster off the persistent vboxnet0 host-only switch. The
# NAT adapter remains available for SSH and Internet access.
virtualbox__intnet: k3s-ansible-default
config_options:
# We currently can not use public-key based authentication on Ubuntu 22.04,
# see: https://github.com/chef/bento/issues/1405
ssh.username: vagrant
ssh.password: vagrant
- name: control2
box: generic/debian12
memory: 1024
cpus: 2
groups:
- k3s_cluster
- master
interfaces:
- network_name: private_network
ip: 192.168.30.39
virtualbox__intnet: k3s-ansible-default
- name: control3
box: generic/rocky9
memory: 1024
cpus: 2
groups:
- k3s_cluster
- master
interfaces:
- network_name: private_network
ip: 192.168.30.40
virtualbox__intnet: k3s-ansible-default
- name: node1
box: generic/ubuntu2204
memory: 1024
cpus: 2
groups:
- k3s_cluster
- node
interfaces:
- network_name: private_network
ip: 192.168.30.41
virtualbox__intnet: k3s-ansible-default
config_options:
# We currently can not use public-key based authentication on Ubuntu 22.04,
# see: https://github.com/chef/bento/issues/1405
ssh.username: vagrant
ssh.password: vagrant
- name: node2
box: generic/rocky9
memory: 1024
cpus: 2
groups:
- k3s_cluster
- node
interfaces:
- network_name: private_network
ip: 192.168.30.42
virtualbox__intnet: k3s-ansible-default
provisioner:
name: ansible
env:
ANSIBLE_VERBOSITY: 1
playbooks:
converge: ../resources/converge.yml
side_effect: ../resources/reset.yml
verify: ../resources/verify.yml
inventory:
links:
group_vars: ../../inventory/sample/group_vars
scenario:
test_sequence:
- dependency
- cleanup
- destroy
- syntax
- create
- prepare
- converge
# idempotence is not possible with the playbook in its current form.
- verify
# We are repurposing side_effect here to test the reset playbook.
# This is why we do not run it before verify (which tests the cluster),
# but after the verify step.
- side_effect
- cleanup
- destroy