blob: efcb9b80017db1135e228ea8d1711cf9aef7a377 [file] [log] [blame]
Zack Williams04575aa2022-03-19 21:51:44 -07001---
2# devtools molecule/default/verify.yml
3#
4# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: Verify
8 hosts: all
9 tasks:
10
11 # bazelisk
12 # Can't be checked, will download bazel if run with --version
13
14 # chromium
Zack Williamsa3ecef42022-03-19 21:51:44 -070015 # Can't be checked as has protections against being run as root
Zack Williams04575aa2022-03-19 21:51:44 -070016
17 # java
18 - name: Check java version
19 command:
20 cmd: "java --version"
21 become: true
22 register: java_version
23 tags:
24 - skip_ansible_lint # info gathering
25
Zack Williamsa3ecef42022-03-19 21:51:44 -070026 - name: Print java version
27 debug:
Zack Williams04575aa2022-03-19 21:51:44 -070028 var: java_version
29
30 - name: Assert java 11 installed
31 assert:
32 that:
33 - "'openjdk 11' in java_version.stdout"
34
35 # kubectl
36 - name: Check kubectl version
37 command:
38 cmd: "kubectl version --client"
39 become: true
40 register: kubectl_version
41 tags:
42 - skip_ansible_lint # info gathering
43
Zack Williamsa3ecef42022-03-19 21:51:44 -070044 - name: Print kubectl version
45 debug:
Zack Williams04575aa2022-03-19 21:51:44 -070046 var: kubectl_version
47
48 - name: Assert kubectl 1.22 installed
49 assert:
50 that:
51 - "'Client Version: version.Info{Major:\"1\", Minor:\"22\"' in kubectl_version.stdout"
52
53 # kind
54 - name: Check kind version
55 command:
56 cmd: "kind --version"
57 become: true
58 register: kind_version
59 tags:
60 - skip_ansible_lint # info gathering
61
Zack Williamsa3ecef42022-03-19 21:51:44 -070062 - name: Print kind version
63 debug:
Zack Williams04575aa2022-03-19 21:51:44 -070064 var: kind_version
65
66 - name: Assert kind 0.13.x installed
67 assert:
68 that:
69 - "'kind version 0.13' in kind_version.stdout"
70
71 # helm
72 - name: Check helm version
73 command:
74 cmd: "helm version"
75 become: true
76 register: helm_version
77 tags:
78 - skip_ansible_lint # info gathering
79
Zack Williamsa3ecef42022-03-19 21:51:44 -070080 - name: Print helm version
81 debug:
Zack Williams04575aa2022-03-19 21:51:44 -070082 var: helm_version
83
84 - name: Assert helm 3.8.x installed
85 assert:
86 that:
87 - "'Version:\"v3.8' in helm_version.stdout"
88
89 # kubeval
90 - name: Check kubeval version
91 command:
92 cmd: "kubeval --version"
93 become: true
94 register: kubeval_version
95 tags:
96 - skip_ansible_lint # info gathering
97
Zack Williamsa3ecef42022-03-19 21:51:44 -070098 - name: Print kubeval version
99 debug:
Zack Williams04575aa2022-03-19 21:51:44 -0700100 var: kubeval_version
101
102 - name: Assert kubeval 0.16.x installed
103 assert:
104 that:
105 - "'Version: 0.16' in kubeval_version.stdout"
106
107 # conftest
108 - name: Check conftest version
109 command:
110 cmd: "conftest --version"
111 become: true
112 register: conftest_version
113 tags:
114 - skip_ansible_lint # info gathering
115
Zack Williamsa3ecef42022-03-19 21:51:44 -0700116 - name: Print conftest version
117 debug:
Zack Williams04575aa2022-03-19 21:51:44 -0700118 var: conftest_version
119
120 - name: Assert conftest 0.32.x installed
121 assert:
122 that:
123 - "'Conftest: 0.32' in conftest_version.stdout"
124
125 # fleet
126 - name: Check fleet version
127 command:
128 cmd: "fleet --version"
129 become: true
130 register: fleet_version
131 tags:
132 - skip_ansible_lint # info gathering
133
Zack Williamsa3ecef42022-03-19 21:51:44 -0700134 - name: Print fleet version
135 debug:
Zack Williams04575aa2022-03-19 21:51:44 -0700136 var: fleet_version
137
138 - name: Assert fleet 0.3.x installed
139 assert:
140 that:
141 - "'fleet version v0.3' in fleet_version.stdout"
142
143 # shellcheck
144 # dies when run under qemu, not checked
145
146 # terraform
147 - name: Check terraform version
148 command:
149 cmd: "terraform --version"
150 become: true
151 register: terraform_version
152 tags:
153 - skip_ansible_lint # info gathering
154
Zack Williamsa3ecef42022-03-19 21:51:44 -0700155 - name: Print terraform version
156 debug:
Zack Williams04575aa2022-03-19 21:51:44 -0700157 var: terraform_version
158
Zack Williamsa3ecef42022-03-19 21:51:44 -0700159 - name: Assert terraform 1.2.x installed
Zack Williams04575aa2022-03-19 21:51:44 -0700160 assert:
161 that:
Zack Williamsa3ecef42022-03-19 21:51:44 -0700162 - "'Terraform v1.2' in terraform_version.stdout"
Zack Williams04575aa2022-03-19 21:51:44 -0700163
164 # tfmask
165 # no version/test command
166
167 # yq
168 - name: Check yq version
169 command:
170 cmd: "yq --version"
171 become: true
172 register: yq_version
173 tags:
174 - skip_ansible_lint # info gathering
175
Zack Williamsa3ecef42022-03-19 21:51:44 -0700176 - name: Print yq version
177 debug:
Zack Williams04575aa2022-03-19 21:51:44 -0700178 var: yq_version
179
180 - name: Assert yq 4.11.x installed
181 assert:
182 that:
183 - "'yq (https://github.com/mikefarah/yq/) version 4.11' in yq_version.stdout"