Ansible roles and playbooks to make the "Tomcat Sample Application" "build and run" on Docker.
Please come here for a more complete presentation.
python3
(installed locally and on the targets (available in$PATH
aspython3
)).ansible
(installed locally and usingpython3
).sudo
(installed on the targets).pip3
(installed on the targets).bash
(installed on the targets).docker
(installed and running on the targets).
N.B: The values of galaxy_info.platforms
and platforms.*.image
corresponds to the platforms on which I carried out my tests.
git clone
this repository.cd
to it.
ansible-playbook -Ki hosts -l localhost site.yml
sudo docker run --rm \
-v "$(pwd):/t:ro" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
--privileged --cap-add SYS_ADMIN \
registry.gitlab.com/le-garff-yoann/docker-molecule:2.22-2.9.5-1.0.2 \
sh -c 'cd /t && . helpers.sh && roles_run_molecule test'