@@ -5,13 +5,77 @@ driver:
55 name : docker
66lint :
77 name : yamllint
8+ # Using geerlingguy's image that provides centos7 with ansible AND systemd
89platforms :
9- - name : instance
10- image : centos:7
10+ - name : " ${MOLECULE_DISTRO:-centos7}-cdh01.local"
11+ image : " geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
12+ pre_build_image : True
13+ privileged : True
14+ volume_mounts :
15+ - " /sys/fs/cgroup:/sys/fs/cgroup:rw"
16+ command : " /usr/sbin/init"
17+ groups :
18+ - cdh_master
19+ - cdh
20+ # following groups required by the role's site.yml playbook
21+ - cdh_servers
22+ - db_server
23+ - scm_server # group used during 'scm' role
24+ - master_servers # group used to install mysql-connector
25+ # networks:
26+ # - name: molecule_cdh
27+ # network_mode: bridge
28+
1129provisioner :
1230 name : ansible
31+ config_options :
32+ defaults :
33+ gathering : smart
34+ fact_caching : jsonfile
35+ fact_caching_connection : /tmp/facts_cache
36+ ssh_connection :
37+ pipelining : True
38+
39+ options :
40+ diff : true
41+ v : True
42+ inventory :
43+ group_vars :
44+ # Note: 'all' inventory group_vars will be overriden by the 'all' playbook group_vars, but not specific groups
45+ cdh_servers :
46+ # we install our own openjdk-8 (as the role only supports JDK7)
47+ cdh_install_java : false
48+ # for molecule tests it's enough to use the builtin Mysql
49+ cdh_install_mysql : true
50+ cdh_install_rngd : false
51+ cdh_install_groups_users : false
52+ cdh_install_cluster : false
53+
54+ # Ensure that the master node is the first in the list (not guaranteed in 'groups.kdcs')
55+ kerberos_server_kdcs : " {{ groups.cdh_master }}"
56+ kerberos_server_kadmin_host : " {{ groups.cdh_master[0] }}"
57+ kerberos_server_realm_name : EXAMPLE.COM
58+ kerberos_server_domain : " local"
59+ # To make molecule tests work, need to disable keberos reverse DNS, because docker builtin DNS is inconsistent
60+ # Details: Returned PTR were suffixed with the network name, except for the own host (resolved by /etc/hosts)
61+ kerberos_server_rdns : " false"
62+
1363 lint :
1464 name : ansible-lint
65+ scenario :
66+ name : default
67+ test_sequence :
68+ # - lint
69+ # - destroy
70+ - dependency
71+ - syntax
72+ - create
73+ - prepare
74+ - converge
75+ # - idempotence
76+ # - side_effect
77+ - verify
78+ # - destroy
1579verifier :
1680 name : testinfra
1781 lint :
0 commit comments