mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
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:
@@ -7,11 +7,11 @@ metadata:
|
||||
annotations:
|
||||
kubespray.com/ci.template-path: "tests/cloud_playbooks/roles/packet-ci/templates/vm.yml.j2"
|
||||
ansible_groups: "{{ node_groups | join(',') }}"
|
||||
inventory_name: "{{ name | d(cloud_image ~ '-' ~ index) }}"
|
||||
# This does not use a dns prefix because dots are hard to escape with map(attribute=) in Jinja
|
||||
labels:
|
||||
kubevirt.io/os: {{ cloud_image }}
|
||||
kubevirt.io/size: small
|
||||
kubevirt.io/domain: "{{ test_name }}"
|
||||
ci_job_id: "{{ ci_job_id }}"
|
||||
ci_job_name: "{{ ci_job_name }}"
|
||||
# leverage the Kubernetes GC for resources cleanup
|
||||
|
||||
Reference in New Issue
Block a user