forked from networklore/ansible-role-nagios
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun_local_molecule_basic.sh
More file actions
26 lines (23 loc) · 944 Bytes
/
run_local_molecule_basic.sh
File metadata and controls
26 lines (23 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# https://molecule.readthedocs.io/en/latest/examples.html#docker
# https://hub.docker.com/r/fminzoni/molecule/
# install docker (sudo pip install docker) / if some error appears try with docker-py
# install ansible
# run from repository role
docker run --rm -it --privileged=True \
-v "$(pwd)":/tmp/$(basename "${PWD}"):ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /tmp/$(basename "${PWD}") \
retr0h/molecule:latest \
sudo molecule --debug syntax
docker run --rm -it --privileged=True \
-v "$(pwd)":/tmp/$(basename "${PWD}"):ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /tmp/$(basename "${PWD}") \
retr0h/molecule:latest \
sudo molecule --debug create
docker run --rm -it --privileged=True \
-v "$(pwd)":/tmp/$(basename "${PWD}"):ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /tmp/$(basename "${PWD}") \
retr0h/molecule:latest \
sudo molecule converge