- Install Docker via geerlingguy.docker
- Install git
- Clone project from repo https://github.com/soksanchhom/test-task.git
- Build Image via Dockerfile in repo
- Running Container with built image
How to install Ansible
sudo pip install ansible
Install Ansible geerlingguy.docker role
ansible-galaxy install geerlingguy.docker
Before running main.yml, you have set variable value in main.yml or you can skip it
- port: 8000
Note: Port 80 is already running in server, it won't running if we choose duplicate port.
Then Running command below to run Ansible
ansible-playbook -i hosts main.yml