*This works on Linux Ubuntu, Windows (Ubuntu installation is needed), or Oracle VirtualBox (Linux Ubuntu) installed on your Windows machine.
Prerequisites:
Steps to execute Ansible compiler:
Open up your terminal.
Run the following command to connect your machine to AWS EC2 Instance: Example: ssh -i 'AKP.pem' [email protected]
Once you're connected to your AWS EC2 Instance, run the following command to start docker daemon: 'sudo service docker start'
After you get Docker service running, execute the next command to pull the docker image for Ansible from DockerHub repository: 'docker pull taichernchao/ansible:latest'
(IMPORTANT FOR STEP 7)
Check the IP address in 'hosts' file and make sure that it is the same as your EC2 instance Public IP Address.
The hosts file look like this:
[host]
3.129.243.179
...
Simply change the IP address to match your running EC2 Instance's Public IP Address.
You'll need to run the build command after you make any changes to update before you get into Ansible compiler: 'docker build . -t taichernchao/ansible'
Run the following command to get into the Ansible compiler: 'docker run -it --privileged taichernchao/ansible bash'
Execute the following ansible command: 'ansible -i hosts all -m ping'
A successful connection will show the following code:
3.129.243.179 | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "ping": "pong" }
Lastly, run the playbook command: 'ansible-playbook -vvv -i hosts sklearn-install.yaml'
PLAY RECAP ********************************************************************* 3.129.243.179 : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
The above statement indicates an example of the successful execution of the playbook command. 'unreachable=1' means that an error has occurred and there are things to be fixed.
Now you will be able to view everything including the Log files.
E.g: 'cat Value.log' or 'cat AnsibleLog.log'
Content type
Image
Digest
Size
562 MB
Last updated
about 5 years ago
docker pull taichernchao/ansible