Merge "prepare-docker-dind: make docker start optional"
[oom/offline-installer.git] / ansible / roles / rancher / molecule / default / molecule.yml
1 ---
2 dependency:
3   name: galaxy
4 driver:
5   name: docker
6 lint:
7   name: yamllint
8 platforms:
9   - name: infrastructure-server
10     image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
11     pre_build_image: true
12     privileged: true
13     override_command: false
14     restart_policy: unless-stopped
15     volumes:
16       - /var/lib/docker
17     groups:
18       - infrastructure
19     networks:
20       - name: rancher
21
22   - name: kubernetes-node-1
23     image: molecule-${PREBUILD_PLATFORM_DISTRO:-centos}:${PREBUILD_DISTRO_VERSION:-centos7.6}
24     pre_build_image: true
25     privileged: true
26     override_command: false
27     restart_policy: unless-stopped
28     volumes:
29       - /var/lib/docker
30       - /var/lib/rancher
31       - /var/lib/kubelet
32     groups:
33       - kubernetes
34     networks:
35       - name: rancher
36     purge_networks: true
37
38 provisioner:
39   name: ansible
40   env:
41     ANSIBLE_ROLES_PATH: ../../../../test/roles
42     ANSIBLE_LIBRARY: ../../../../library
43   inventory:
44     links:
45       group_vars: ../../../../group_vars
46     # 1) When running with molecule-dev container, use this definition and comment out localhost under host_vars (2)
47     hosts:
48       all:
49         hosts:
50           localhost:
51             ansible_connection: ssh
52             ansible_host: ${LOCALHOST_ANSIBLE_HOST:-""}
53             ansible_user: ${LOCALHOST_ANSIBLE_USER:-""}
54             ansible_password: ${LOCALHOST_ANSIBLE_PASSWORD:-""}
55             ansible_sudo_pass: ${LOCALHOST_ANSIBLE_SUDO_PASS:-""}
56             # end of 1)
57             # 2) When running with native molecule installation, use this definition and comment out hosts section under inventory (1)
58             # host_vars:
59             # localhost:
60             #   ansible_sudo_pass: ${LOCALHOST_ANSIBLE_SUDO_PASS:-""}
61             #   ansible_ssh_pass: ${LOCALHOST_ANSIBLE_PASSWORD:-""}
62             # End of 2)
63   lint:
64     name: ansible-lint
65 scenario:
66   name: default
67   test_sequence:
68     - lint
69     - cleanup
70     - destroy
71     - dependency
72     - syntax
73     - create
74     - prepare
75     - converge
76     # - idempotence
77     # --> Action: 'idempotence'
78     # ERROR: Idempotence test failed because of the following tasks:
79     # * [infrastructure-server] => rancher : Create rancher kubernetes environment
80     # * [kubernetes-node-1] => rancher : Add Rancher Agent
81     - side_effect
82     - verify
83     - cleanup
84     - destroy
85 verifier:
86   name: testinfra
87   lint:
88     name: flake8