Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 1 | --- |
| 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 15 | # Can't be checked as has protections against being run as root |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 16 | |
| 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 26 | - name: Print java version |
| 27 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 28 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 44 | - name: Print kubectl version |
| 45 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 46 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 62 | - name: Print kind version |
| 63 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 64 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 80 | - name: Print helm version |
| 81 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 82 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 98 | - name: Print kubeval version |
| 99 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 100 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 116 | - name: Print conftest version |
| 117 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 118 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 134 | - name: Print fleet version |
| 135 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 136 | 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 155 | - name: Print terraform version |
| 156 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 157 | var: terraform_version |
| 158 | |
Zack Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 159 | - name: Assert terraform 1.2.x installed |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 160 | assert: |
| 161 | that: |
Zack Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 162 | - "'Terraform v1.2' in terraform_version.stdout" |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 163 | |
| 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 Williams | a3ecef4 | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 176 | - name: Print yq version |
| 177 | debug: |
Zack Williams | 04575aa | 2022-03-19 21:51:44 -0700 | [diff] [blame] | 178 | 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" |