Zack Williams | e0d9eb9 | 2020-11-29 22:39:20 -0700 | [diff] [blame] | 1 | --- |
| 2 | # docker 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 Docker version string |
| 12 | command: |
| 13 | cmd: "docker version" |
Wei-Yu Chen | c106ab5 | 2022-03-25 01:55:26 +0800 | [diff] [blame^] | 14 | become: true |
Zack Williams | e0d9eb9 | 2020-11-29 22:39:20 -0700 | [diff] [blame] | 15 | register: docker_version |
| 16 | tags: |
| 17 | - skip_ansible_lint # info gathering |
| 18 | |
| 19 | - debug: |
| 20 | var: docker_version |
| 21 | |
| 22 | - name: Assert that installed Docker version matches version string |
| 23 | assert: |
| 24 | that: |
Wei-Yu Chen | c106ab5 | 2022-03-25 01:55:26 +0800 | [diff] [blame^] | 25 | - "'Version: 20.10' in docker_version.stdout" |
Hyunsun Moon | c272be6 | 2021-12-02 13:54:40 -0800 | [diff] [blame] | 26 | |
| 27 | - name: Check docker daemon option exists |
| 28 | command: |
| 29 | cmd: "docker info -f {% raw %}'{{ index .RegistryConfig.Mirrors 0 }}'{% endraw %}" |
Wei-Yu Chen | c106ab5 | 2022-03-25 01:55:26 +0800 | [diff] [blame^] | 30 | become: true |
Hyunsun Moon | c272be6 | 2021-12-02 13:54:40 -0800 | [diff] [blame] | 31 | register: docker_info |
| 32 | tags: |
| 33 | - skip_ansible_lint # info gathering |
| 34 | |
| 35 | - debug: |
| 36 | var: docker_info |
| 37 | |
| 38 | - name: Assert that installed Docker version matches version string |
| 39 | assert: |
| 40 | that: |
| 41 | - "'http://registry.aetherproject.net' in docker_info.stdout" |
| 42 | |
| 43 | - name: Check installed Docker compose version string |
| 44 | command: |
| 45 | cmd: "docker-compose --version" |
Wei-Yu Chen | c106ab5 | 2022-03-25 01:55:26 +0800 | [diff] [blame^] | 46 | become: true |
Hyunsun Moon | c272be6 | 2021-12-02 13:54:40 -0800 | [diff] [blame] | 47 | register: docker_compose_version |
| 48 | tags: |
| 49 | - skip_ansible_lint # info gathering |
| 50 | |
| 51 | - debug: |
| 52 | var: docker_compose_version |
| 53 | |
| 54 | - name: Assert that installed Docker compose version matches version string |
| 55 | assert: |
| 56 | that: |
Wei-Yu Chen | c106ab5 | 2022-03-25 01:55:26 +0800 | [diff] [blame^] | 57 | - "'Docker Compose version v2.3.4' in docker_compose_version.stdout" |