File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ # Molecule managed
2+
3+ {% if item .registry is defined %}
4+ FROM {{ item.registry.url }}/{{ item.image }}
5+ {% else %}
6+ FROM {{ item.image }}
7+ {% endif %}
8+
9+ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \
10+ elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \
11+ elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
12+ elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \
13+ elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
14+ elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi
Original file line number Diff line number Diff line change 1+ *******
2+ Docker driver installation guide
3+ *******
4+
5+ Requirements
6+ ============
7+
8+ * Docker Engine
9+
10+ Install
11+ =======
12+
13+ Please refer to the `Virtual environment `_ documentation for installation best
14+ practices. If not using a virtual environment, please consider passing the
15+ widely recommended `'--user' flag `_ when invoking ``pip ``.
16+
17+ .. _Virtual environment : https://virtualenv.pypa.io/en/latest/
18+ .. _'--user' flag : https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site
19+
20+ .. code-block :: bash
21+
22+ $ pip install ' molecule[docker]'
Original file line number Diff line number Diff line change 1+ ---
2+ dependency :
3+ name : galaxy
4+ driver :
5+ name : docker
6+ lint :
7+ name : yamllint
8+ platforms :
9+ - name : instance
10+ image : centos:7
11+ provisioner :
12+ name : ansible
13+ lint :
14+ name : ansible-lint
15+ verifier :
16+ name : testinfra
17+ lint :
18+ name : flake8
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Converge
3+ hosts : all
4+ roles :
5+ - role : cloudera-playbook
Original file line number Diff line number Diff line change 1+ import os
2+
3+ import testinfra .utils .ansible_runner
4+
5+ testinfra_hosts = testinfra .utils .ansible_runner .AnsibleRunner (
6+ os .environ ['MOLECULE_INVENTORY_FILE' ]).get_hosts ('all' )
7+
8+
9+ def test_hosts_file (host ):
10+ f = host .file ('/etc/hosts' )
11+
12+ assert f .exists
13+ assert f .user == 'root'
14+ assert f .group == 'root'
You can’t perform that action at this time.
0 commit comments