2019-05-27 20:31:52 +08:00
|
|
|
---
|
2021-03-24 08:26:05 +08:00
|
|
|
- hosts: kube_control_plane[0]
|
2019-05-27 20:31:52 +08:00
|
|
|
vars:
|
2022-11-15 16:46:41 +08:00
|
|
|
sonobuoy_version: 0.56.11
|
2019-05-27 20:31:52 +08:00
|
|
|
sonobuoy_arch: amd64
|
|
|
|
sonobuoy_parallel: 30
|
|
|
|
sonobuoy_path: /usr/local/bin/sonobuoy
|
2022-11-15 16:46:41 +08:00
|
|
|
sonobuoy_mode: certified-conformance
|
2019-05-27 20:31:52 +08:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Run sonobuoy
|
|
|
|
when:
|
|
|
|
- sonobuoy_enabled is defined
|
|
|
|
- sonobuoy_enabled
|
|
|
|
block:
|
|
|
|
- name: Download sonobuoy
|
|
|
|
get_url:
|
|
|
|
url: "https://github.com/heptio/sonobuoy/releases/download/v{{ sonobuoy_version }}/sonobuoy_{{ sonobuoy_version }}_linux_{{ sonobuoy_arch }}.tar.gz"
|
|
|
|
dest: /tmp/sonobuoy.tar.gz
|
|
|
|
|
|
|
|
- name: Extract sonobuoy
|
|
|
|
unarchive:
|
|
|
|
src: /tmp/sonobuoy.tar.gz
|
|
|
|
dest: /usr/local/bin/
|
|
|
|
copy: no
|
|
|
|
|
|
|
|
- name: Run sonobuoy
|
2022-11-15 16:46:41 +08:00
|
|
|
command: "{{ sonobuoy_path }} run --mode {{ sonobuoy_mode }} --e2e-parallel {{ sonobuoy_parallel }} --wait"
|
2019-05-27 20:31:52 +08:00
|
|
|
when: sonobuoy_enabled | default(false)
|
|
|
|
|
|
|
|
- name: Run sonobuoy retrieve
|
|
|
|
command: "{{ sonobuoy_path }} retrieve"
|
|
|
|
register: sonobuoy_retrieve
|
|
|
|
|
|
|
|
- name: Run inspect results
|
2022-11-15 16:46:41 +08:00
|
|
|
command: "{{ sonobuoy_path }} results {{ sonobuoy_retrieve.stdout }} --plugin e2e --mode report"
|