blob: efcb9b80017db1135e228ea8d1711cf9aef7a377 [file] [log] [blame]
---
# devtools molecule/default/verify.yml
#
# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Verify
hosts: all
tasks:
# bazelisk
# Can't be checked, will download bazel if run with --version
# chromium
# Can't be checked as has protections against being run as root
# java
- name: Check java version
command:
cmd: "java --version"
become: true
register: java_version
tags:
- skip_ansible_lint # info gathering
- name: Print java version
debug:
var: java_version
- name: Assert java 11 installed
assert:
that:
- "'openjdk 11' in java_version.stdout"
# kubectl
- name: Check kubectl version
command:
cmd: "kubectl version --client"
become: true
register: kubectl_version
tags:
- skip_ansible_lint # info gathering
- name: Print kubectl version
debug:
var: kubectl_version
- name: Assert kubectl 1.22 installed
assert:
that:
- "'Client Version: version.Info{Major:\"1\", Minor:\"22\"' in kubectl_version.stdout"
# kind
- name: Check kind version
command:
cmd: "kind --version"
become: true
register: kind_version
tags:
- skip_ansible_lint # info gathering
- name: Print kind version
debug:
var: kind_version
- name: Assert kind 0.13.x installed
assert:
that:
- "'kind version 0.13' in kind_version.stdout"
# helm
- name: Check helm version
command:
cmd: "helm version"
become: true
register: helm_version
tags:
- skip_ansible_lint # info gathering
- name: Print helm version
debug:
var: helm_version
- name: Assert helm 3.8.x installed
assert:
that:
- "'Version:\"v3.8' in helm_version.stdout"
# kubeval
- name: Check kubeval version
command:
cmd: "kubeval --version"
become: true
register: kubeval_version
tags:
- skip_ansible_lint # info gathering
- name: Print kubeval version
debug:
var: kubeval_version
- name: Assert kubeval 0.16.x installed
assert:
that:
- "'Version: 0.16' in kubeval_version.stdout"
# conftest
- name: Check conftest version
command:
cmd: "conftest --version"
become: true
register: conftest_version
tags:
- skip_ansible_lint # info gathering
- name: Print conftest version
debug:
var: conftest_version
- name: Assert conftest 0.32.x installed
assert:
that:
- "'Conftest: 0.32' in conftest_version.stdout"
# fleet
- name: Check fleet version
command:
cmd: "fleet --version"
become: true
register: fleet_version
tags:
- skip_ansible_lint # info gathering
- name: Print fleet version
debug:
var: fleet_version
- name: Assert fleet 0.3.x installed
assert:
that:
- "'fleet version v0.3' in fleet_version.stdout"
# shellcheck
# dies when run under qemu, not checked
# terraform
- name: Check terraform version
command:
cmd: "terraform --version"
become: true
register: terraform_version
tags:
- skip_ansible_lint # info gathering
- name: Print terraform version
debug:
var: terraform_version
- name: Assert terraform 1.2.x installed
assert:
that:
- "'Terraform v1.2' in terraform_version.stdout"
# tfmask
# no version/test command
# yq
- name: Check yq version
command:
cmd: "yq --version"
become: true
register: yq_version
tags:
- skip_ansible_lint # info gathering
- name: Print yq version
debug:
var: yq_version
- name: Assert yq 4.11.x installed
assert:
that:
- "'yq (https://github.com/mikefarah/yq/) version 4.11' in yq_version.stdout"