Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. ansible -i ~/inventory all - ping
  2.  
  3. FROM python:2
  4.  
  5. COPY .ansible.cfg /root
  6.  
  7. RUN apt-get update && apt-get install sshpass
  8.  
  9. RUN pip install ansible
  10.  
  11. docker build -t ansible .
  12. docker run -it -v $HOME/inventory:/inventory ansible /bin/bash
  13.  
  14. root@ba6af0496a84:/# ansible -vvv -i inventory all -m ping
  15. 64.137.176.75 | UNREACHABLE! => {
  16. "changed": false,
  17. "msg": "Failed to connect to the host via ssh.",
  18. "unreachable": true
  19. }
  20. root@ba6af0496a84:/# ansible -vvv -i inventory all -m ping
  21. Using /root/.ansible.cfg as config file
  22. <64.137.176.75> ESTABLISH SSH CONNECTION FOR USER: root
  23. <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'"'"''
  24. 64.137.176.75 | UNREACHABLE! => {
  25. "changed": false,
  26. "msg": "Failed to connect to the host via ssh.",
  27. "unreachable": true
  28. }
  29.  
  30. ansible_connection=ssh
  31. ansible_user=root
  32. ansible_ssh_pass=xxxxx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement