Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ansible -i ~/inventory all - ping
- FROM python:2
- COPY .ansible.cfg /root
- RUN apt-get update && apt-get install sshpass
- RUN pip install ansible
- docker build -t ansible .
- docker run -it -v $HOME/inventory:/inventory ansible /bin/bash
- root@ba6af0496a84:/# ansible -vvv -i inventory all -m ping
- 64.137.176.75 | UNREACHABLE! => {
- "changed": false,
- "msg": "Failed to connect to the host via ssh.",
- "unreachable": true
- }
- root@ba6af0496a84:/# ansible -vvv -i inventory all -m ping
- Using /root/.ansible.cfg as config file
- <64.137.176.75> ESTABLISH SSH CONNECTION FOR USER: root
- <64.137.176.75> SSH: EXEC sshpass -d12 ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r 64.137.176.75 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1472388982.6-16651511220249 `" && echo ansible-tmp-1472388982.6-16651511220249="` echo $HOME/.ansible/tmp/ansible-tmp-1472388982.6-16651511220249 `" ) && sleep 0'"'"''
- 64.137.176.75 | UNREACHABLE! => {
- "changed": false,
- "msg": "Failed to connect to the host via ssh.",
- "unreachable": true
- }
- ansible_connection=ssh
- ansible_user=root
- ansible_ssh_pass=xxxxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement