mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-06 03:01:13 -03:30
CI: adapt packet-ci role to act as a molecule provisioner
To work with molecule, we need to use the name provided by molecule_yml in inventory. Inject the name in the VirtualMachineInstance (with a default to handle non-molecule scenario) and get it back as part of inventory). Account for no ansible groups
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Provision Packet VMs
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
become: true
|
||||
roles:
|
||||
- { role: packet-ci, vm_cleanup: false }
|
||||
tasks:
|
||||
- name: Create Kubevirt VMs
|
||||
import_role:
|
||||
name: packet-ci
|
||||
- name: Update inventory for Molecule
|
||||
meta: refresh_inventory
|
||||
|
||||
Reference in New Issue
Block a user