mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Rename bootstrap-os to bootstrap_os
Role names in ansible collections should not have hyphens.
This commit is contained in:
7
roles/bootstrap_os/molecule/default/converge.yml
Normal file
7
roles/bootstrap_os/molecule/default/converge.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
become: true
|
||||
roles:
|
||||
- role: bootstrap_os
|
||||
37
roles/bootstrap_os/molecule/default/molecule.yml
Normal file
37
roles/bootstrap_os/molecule/default/molecule.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
role_name_check: 1
|
||||
dependency:
|
||||
name: galaxy
|
||||
platforms:
|
||||
- name: ubuntu20
|
||||
cloud_image: ubuntu-2004
|
||||
vm_cpu_cores: 1
|
||||
vm_memory: 512
|
||||
- name: ubuntu22
|
||||
cloud_image: ubuntu-2204
|
||||
vm_cpu_cores: 1
|
||||
vm_memory: 512
|
||||
- name: almalinux9
|
||||
cloud_image: almalinux-9
|
||||
vm_cpu_cores: 1
|
||||
vm_memory: 512
|
||||
- name: debian12
|
||||
cloud_image: debian-12
|
||||
vm_cpu_cores: 1
|
||||
vm_memory: 512
|
||||
provisioner:
|
||||
name: ansible
|
||||
config_options:
|
||||
defaults:
|
||||
callbacks_enabled: profile_tasks
|
||||
timeout: 120
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
user:
|
||||
name: foo
|
||||
comment: My test comment
|
||||
playbooks:
|
||||
create: ../../../../tests/cloud_playbooks/create-kubevirt.yml
|
||||
verifier:
|
||||
name: testinfra
|
||||
11
roles/bootstrap_os/molecule/default/tests/test_default.py
Normal file
11
roles/bootstrap_os/molecule/default/tests/test_default.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']
|
||||
).get_hosts('all')
|
||||
|
||||
|
||||
def test_python(host):
|
||||
assert host.exists('python3') or host.exists('python')
|
||||
Reference in New Issue
Block a user