[ansible-project] Re: Need Assistance With Ansible Error

2020-04-15 Thread David Foley
It's not refusing the connection, but no harm in trying;

Did you add the key to known hosts file?



https://www.techrepublic.com/article/how-to-easily-add-an-ssh-fingerprint-to-your-knownhosts-file-in-linux/

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/10f5d94f-eea8-4d20-ad49-1ed45dc1a9d3%40googlegroups.com.


[ansible-project] Re: Need Assistance With Ansible Error

2020-04-14 Thread George James
Thanks Orkhan, but the same issue 

On Wednesday, April 15, 2020 at 8:54:51 AM UTC+4, Orkhan Mammadov wrote:
>
> Run the file from the directory, where your config file is located.
>
> On Wednesday, April 15, 2020 at 7:46:36 AM UTC+4, George James wrote:
>>
>> I am new to ansible.
>>
>> I create an inventory file 
>>
>> [web] 
>> 167.172.xxx.xxx ansible_connection=ssh ansible_user=root 
>> ansible_ssh_private_key_file=~/.ssh/id_rsa.pub
>>
>> Then I run 
>>
>> ansible web -m ping -i hosts -
>>
>> But I am presented with the following log and error
>>
>>
>> ansible 2.9.6
>>   config file = None
>>   configured module search path = 
>> ['/Users/g.james/.ansible/plugins/modules', 
>> '/usr/share/ansible/plugins/modules']
>>   ansible python module location = 
>> /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible
>>   executable location = /usr/local/bin/ansible
>>   python version = 3.8.2 (default, Mar 11 2020, 00:29:50) [Clang 11.0.0 
>> (clang-1100.0.33.17)]
>> No config file found; using defaults
>> setting up inventory plugins
>> host_list declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as 
>> it did not pass its verify_file() method
>> script declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as it 
>> did not pass its verify_file() method
>> auto declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as it 
>> did not pass its verify_file() method
>> Parsed /Users/g.james/dojo360/d3-scripts/server/hosts inventory source with 
>> ini plugin
>> Loading callback plugin minimal of type stdout, v2.0 from 
>> /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible/plugins/callback/minimal.py
>> META: ran handlers
>> <67.172.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: root
>> <67.172.xxx.xxx> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o 
>> ControlPersist=60s -o 'IdentityFile="/Users/g.james/.ssh/id_rsa.pub"' -o 
>> KbdInteractiveAuthentication=no -o 
>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o 
>> PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 
>> ControlPath=/Users/g.james/.ansible/cp/5d3d6b8351 67.172.xxx.xxx '/bin/sh -c 
>> '"'"'echo ~root && sleep 0'"'"''
>> <67.172.xxx.xxx> (255, b'', b'OpenSSH_7.9p1, LibreSSL 2.7.3\r\ndebug1: 
>> Reading configuration data /etc/ssh/ssh_config\r\ndebug1: 
>> /etc/ssh/ssh_config line 48: Applying options for *\r\ndebug2: 
>> resolve_canonicalize: hostname 67.172.xxx.xxx is address\r\ndebug1: 
>> auto-mux: Trying existing master\r\ndebug1: Control socket 
>> "/Users/g.james/.ansible/cp/5d3d6b8351" does not exist\r\ndebug2: 
>> ssh_connect_direct\r\ndebug1: Connecting to 67.172.xxx.xxx [67.172.xxx.xxx] 
>> port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: connect to address 
>> 67.172.xxx.xxx port 22: Operation timed out\r\nssh: connect to host 
>> 67.172.xxx.xxx port 22: Operation timed out\r\n')
>> 67.172.xxx.xxx | UNREACHABLE! => {
>> "changed": false,
>> "msg": "Failed to connect to the host via ssh: OpenSSH_7.9p1, LibreSSL 
>> 2.7.3\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: 
>> /etc/ssh/ssh_config line 48: Applying options for *\r\ndebug2: 
>> resolve_canonicalize: hostname 67.172.xxx.xxx is address\r\ndebug1: 
>> auto-mux: Trying existing master\r\ndebug1: Control socket 
>> \"/Users/g.james/.ansible/cp/5d3d6b8351\" does not exist\r\ndebug2: 
>> ssh_connect_direct\r\ndebug1: Connecting to 67.172.xxx.xxx [67.172.xxx.xxx] 
>> port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: connect to address 
>> 67.172.xxx.xxx port 22: Operation timed out\r\nssh: connect to host 
>> 67.172.xxx.xxx port 22: Operation timed out",
>> "unreachable": true
>> }
>>
>> Please I need help, I have been stuck on this for 48 hours, tried different 
>> computers  and VMs all returns back the same result
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/32323a26-0f2f-4381-a3ef-ff2be0bc94a7%40googlegroups.com.


[ansible-project] Re: Need Assistance With Ansible Error

2020-04-14 Thread Orkhan Mammadov
Run the file from the directory, where your config file is located.

On Wednesday, April 15, 2020 at 7:46:36 AM UTC+4, George James wrote:
>
> I am new to ansible.
>
> I create an inventory file 
>
> [web] 
> 167.172.xxx.xxx ansible_connection=ssh ansible_user=root 
> ansible_ssh_private_key_file=~/.ssh/id_rsa.pub
>
> Then I run 
>
> ansible web -m ping -i hosts -
>
> But I am presented with the following log and error
>
>
> ansible 2.9.6
>   config file = None
>   configured module search path = ['/Users/g.james/.ansible/plugins/modules', 
> '/usr/share/ansible/plugins/modules']
>   ansible python module location = 
> /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible
>   executable location = /usr/local/bin/ansible
>   python version = 3.8.2 (default, Mar 11 2020, 00:29:50) [Clang 11.0.0 
> (clang-1100.0.33.17)]
> No config file found; using defaults
> setting up inventory plugins
> host_list declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as 
> it did not pass its verify_file() method
> script declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as it 
> did not pass its verify_file() method
> auto declined parsing /Users/g.james/dojo360/d3-scripts/server/hosts as it 
> did not pass its verify_file() method
> Parsed /Users/g.james/dojo360/d3-scripts/server/hosts inventory source with 
> ini plugin
> Loading callback plugin minimal of type stdout, v2.0 from 
> /usr/local/Cellar/ansible/2.9.6_1/libexec/lib/python3.8/site-packages/ansible/plugins/callback/minimal.py
> META: ran handlers
> <67.172.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: root
> <67.172.xxx.xxx> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o 
> ControlPersist=60s -o 'IdentityFile="/Users/g.james/.ssh/id_rsa.pub"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o 
> PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 
> ControlPath=/Users/g.james/.ansible/cp/5d3d6b8351 67.172.xxx.xxx '/bin/sh -c 
> '"'"'echo ~root && sleep 0'"'"''
> <67.172.xxx.xxx> (255, b'', b'OpenSSH_7.9p1, LibreSSL 2.7.3\r\ndebug1: 
> Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config 
> line 48: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 
> 67.172.xxx.xxx is address\r\ndebug1: auto-mux: Trying existing 
> master\r\ndebug1: Control socket "/Users/g.james/.ansible/cp/5d3d6b8351" does 
> not exist\r\ndebug2: ssh_connect_direct\r\ndebug1: Connecting to 
> 67.172.xxx.xxx [67.172.xxx.xxx] port 22.\r\ndebug2: fd 3 setting 
> O_NONBLOCK\r\ndebug1: connect to address 67.172.xxx.xxx port 22: Operation 
> timed out\r\nssh: connect to host 67.172.xxx.xxx port 22: Operation timed 
> out\r\n')
> 67.172.xxx.xxx | UNREACHABLE! => {
> "changed": false,
> "msg": "Failed to connect to the host via ssh: OpenSSH_7.9p1, LibreSSL 
> 2.7.3\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: 
> /etc/ssh/ssh_config line 48: Applying options for *\r\ndebug2: 
> resolve_canonicalize: hostname 67.172.xxx.xxx is address\r\ndebug1: auto-mux: 
> Trying existing master\r\ndebug1: Control socket 
> \"/Users/g.james/.ansible/cp/5d3d6b8351\" does not exist\r\ndebug2: 
> ssh_connect_direct\r\ndebug1: Connecting to 67.172.xxx.xxx [67.172.xxx.xxx] 
> port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: connect to address 
> 67.172.xxx.xxx port 22: Operation timed out\r\nssh: connect to host 
> 67.172.xxx.xxx port 22: Operation timed out",
> "unreachable": true
> }
>
> Please I need help, I have been stuck on this for 48 hours, tried different 
> computers  and VMs all returns back the same result
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b3197ac7-0e43-4d50-bc4a-4be55b772968%40googlegroups.com.