blob: eb7f8c198e5b56f6cc0f0b37e851a19f8dddbfad [file] [log] [blame]
Samuli Silviusbb3bef82019-04-04 08:22:08 +03001---
2dependency:
3 name: galaxy
4driver:
5 name: docker
6lint:
7 name: yamllint
8platforms:
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
Samuli Silviusbb3bef82019-04-04 08:22:08 +030015 volumes:
Michal Zegana83ae842019-05-22 17:53:00 +020016 - /var/lib/docker
Samuli Silviusbb3bef82019-04-04 08:22:08 +030017 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
Samuli Silviusbb3bef82019-04-04 08:22:08 +030028 volumes:
Michal Zegana83ae842019-05-22 17:53:00 +020029 - /var/lib/docker
30 - /var/lib/rancher
31 - /var/lib/kubelet
Samuli Silviusbb3bef82019-04-04 08:22:08 +030032 groups:
33 - kubernetes
34 networks:
35 - name: rancher
Michal Zegana83ae842019-05-22 17:53:00 +020036 purge_networks: true
Samuli Silviusbb3bef82019-04-04 08:22:08 +030037
38provisioner:
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
65scenario:
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
85verifier:
86 name: testinfra
87 lint:
88 name: flake8