mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 05:52:37 +00:00
Issue #10: Attempt setting up a KinD cluster in CI workflow.g
This commit is contained in:
34
molecule/default/molecule.yml
Normal file
34
molecule/default/molecule.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: false
|
||||
login_cmd_template: 'docker exec -ti {instance} bash'
|
||||
ansible_connection_options:
|
||||
ansible_connection: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
options:
|
||||
config-data:
|
||||
line-length:
|
||||
max: 160
|
||||
platforms:
|
||||
- name: instance-kind
|
||||
provisioner:
|
||||
name: ansible
|
||||
log: true
|
||||
lint: {}
|
||||
inventory:
|
||||
host_vars:
|
||||
localhost:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
env:
|
||||
ANSIBLE_ROLES_PATH: ${ANSIBLE_ROLES_PATH}:../../tests/integration/targets
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
# - lint
|
||||
- syntax
|
||||
- converge
|
||||
- idempotence
|
||||
- verify
|
||||
23
molecule/default/playbook.yml
Normal file
23
molecule/default/playbook.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
|
||||
collections:
|
||||
- community.kubernetes
|
||||
|
||||
tasks:
|
||||
- name: Testing.
|
||||
k8s_info:
|
||||
namespace: kube-system
|
||||
kind: Pod
|
||||
register: pod_list
|
||||
|
||||
- name: Testing listing.
|
||||
debug:
|
||||
msg: "{{ pod_list.resources | count }}"
|
||||
|
||||
- name: Include Kubernetes integration testing role.
|
||||
include_role:
|
||||
name: kubernetes
|
||||
Reference in New Issue
Block a user