| --- |
| # docker molecule/default/verify.yml |
| # |
| # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| - name: Verify |
| hosts: all |
| tasks: |
| |
| - name: Check installed Docker version string |
| command: |
| cmd: "docker version" |
| become: true |
| register: docker_version |
| tags: |
| - skip_ansible_lint # info gathering |
| |
| - debug: |
| var: docker_version |
| |
| - name: Assert that installed Docker version matches version string |
| assert: |
| that: |
| - "'Version: 20.10' in docker_version.stdout" |
| |
| - name: Check docker daemon option exists |
| command: |
| cmd: "docker info -f {% raw %}'{{ index .RegistryConfig.Mirrors 0 }}'{% endraw %}" |
| become: true |
| register: docker_info |
| tags: |
| - skip_ansible_lint # info gathering |
| |
| - debug: |
| var: docker_info |
| |
| - name: Assert that installed Docker version matches version string |
| assert: |
| that: |
| - "'http://registry.aetherproject.net' in docker_info.stdout" |
| |
| - name: Check installed Docker compose version string |
| command: |
| cmd: "docker-compose --version" |
| become: true |
| register: docker_compose_version |
| tags: |
| - skip_ansible_lint # info gathering |
| |
| - debug: |
| var: docker_compose_version |
| |
| - name: Assert that installed Docker compose version matches version string |
| assert: |
| that: |
| - "'Docker Compose version v2.3.4' in docker_compose_version.stdout" |