Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [dev]
- dev ansible_ssh_host=ec2-host-ip.compute-1.amazonaws.com ansible_ssh_user=ec2-user ansible_ssh_private_key_file=~/awskeys/ec2key.pem
- [vagrant]
- web ansible_ssh_host=192.168.33.20 ansible_ssh_user=vagrant ansible_ssh_pass=vagrant
- db ansible_ssh_host=192.168.33.30 ansible_ssh_user=vagrant ansible_ssh_pass=vagrant
- $ ansible vagrant -i invertory -m ping
- $ ansible dev-wb -i invertory -m ping -vvv
- Using /etc/ansible/ansible.cfg as config file
- <ec2-some-ip.compute-1.amazonaws.com> ESTABLISH SSH CONNECTION FOR USER: ec2-user
- <ec2-some-ip.compute-1.amazonaws.com> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="~/awskeys/ec2key.pem"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o ControlPath=/Users/.ansible/cp/ansible-ssh-%h-%p-%r ec2-some-ip.compute-1.amazonaws.com '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1469435660.51-156184209634917 `" && echo ansible-tmp-1469435660.51-156184209634917="` echo $HOME/.ansible/tmp/ansible-tmp-1469435660.51-156184209634917 `" ) && sleep 0'"'"''
- dev-wb | UNREACHABLE! => {
- "changed": false,
- "msg": "Failed to connect to the host via ssh.",
- "unreachable": true
- }
- $ ssh -t -i "~/awskeys/ec2key.pem" ec2-user@ec2-some-ip.compute-1.amazonaws.com -p 22
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement