This play is responsable for providing a container to setup http server. The container is built based on treasureboat/ssh and listens on port 22 for ssh connection. Last task ensure that the container is started
Ensure that the system has all requirements for provisioning http server. First, a single pre task installs python using the raw module. After that apache is installed and started. Then index.html is copied to the remote machine and apache service is restarted to apply changes
Give your sudo/dzdo password
ansible-playbook provision.yml --ask-become-passGo to your browser and type:
http://172.17.0.2:80
Feel free to update index.html but don't forget to run the bellow command after changes:
ansible-playbook provision.yml --ask-pass --tags update-
raw module is useful and should only be done in a few cases. A common case is installing python on a system without python installed by default. From ansible docs
-
In this case facts are not used, so gather_facts: no
-
Running with --tags docker executes only Create container play
-
Running with --tags provision executes only Provision HTTP server play
