blob: 67152ee93124afacf9aa4d78c328541da4a23795 [file] [log] [blame]
Zack Williamse0d9eb92020-11-29 22:39:20 -07001---
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 Chenc106ab52022-03-25 01:55:26 +080014 become: true
Zack Williamse0d9eb92020-11-29 22:39:20 -070015 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 Chenc106ab52022-03-25 01:55:26 +080025 - "'Version: 20.10' in docker_version.stdout"
Hyunsun Moonc272be62021-12-02 13:54:40 -080026
27 - name: Check docker daemon option exists
28 command:
29 cmd: "docker info -f {% raw %}'{{ index .RegistryConfig.Mirrors 0 }}'{% endraw %}"
Wei-Yu Chenc106ab52022-03-25 01:55:26 +080030 become: true
Hyunsun Moonc272be62021-12-02 13:54:40 -080031 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 Chenc106ab52022-03-25 01:55:26 +080046 become: true
Hyunsun Moonc272be62021-12-02 13:54:40 -080047 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 Chenc106ab52022-03-25 01:55:26 +080057 - "'Docker Compose version v2.3.4' in docker_compose_version.stdout"