Zack Williams | 5516458 | 2020-10-01 21:05:56 -0700 | [diff] [blame] | 1 | --- |
| 2 | # nodejs molecule/default/verify.yml |
| 3 | # |
| 4 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | |
| 7 | - name: Verify |
| 8 | hosts: all |
| 9 | tasks: |
| 10 | |
| 11 | - name: Check installed Node.js version string |
| 12 | command: |
Zack Williams | 2a485e0 | 2022-05-14 20:38:41 -0700 | [diff] [blame^] | 13 | cmd: "node --version" |
Zack Williams | 5516458 | 2020-10-01 21:05:56 -0700 | [diff] [blame] | 14 | register: nodejs_version |
| 15 | tags: |
| 16 | - skip_ansible_lint # info gathering |
| 17 | |
Zack Williams | 2a485e0 | 2022-05-14 20:38:41 -0700 | [diff] [blame^] | 18 | - name: Check installed Node.js version number |
| 19 | debug: |
Zack Williams | 5516458 | 2020-10-01 21:05:56 -0700 | [diff] [blame] | 20 | var: nodejs_version |
| 21 | |
| 22 | - name: Assert that installed Node.js version matches version string |
| 23 | assert: |
| 24 | that: |
| 25 | - "'v12' in nodejs_version.stdout" |