Re: [ansible-project] [WARNING]: Unhandled error in Python interpreter....

2020-11-18 Thread bill paxton
Thank you.  I did open an ansible github issue 
 and subsequently closed 
it based on respondents there.  Your comments above definitely helped.  
Seems 2.9.10 fixed "buggy behavior" that I was relying on by not explicitly 
using "connection: local".
On Friday, November 13, 2020 at 2:32:37 AM UTC-6 vbo...@gmail.com wrote:

> On Thu, 12 Nov 2020 15:13:37 -0800 (PST)
> bill paxton  wrote:
>
> > I have a task that works fine for Ansible 2.9.7, but fails when I 
> upgrade 
> > to 2.10.3.
> > ...
> > Data could not be sent to remote host "localhost". Make sure this host 
> can 
> > be reached over ssh: ssh: connect to host localhost port 22: Cannot 
> assign 
> > requested address
>
> FWIW, I'm still on 2.9.6.
>
> As a hint, try to find out why *ssh* connection plugin is used to
> connect localhost. IMHO, the default is *local*. For example, testing
> with no configuration of the connection ("cat hosts | grep
> connection" shows nothing)
>
> shell> cat pb.yml
> - hosts: test_01
> tasks:
> - debug:
> var: ansible_connection
> - debug:
> var: ansible_connection
> delegate_to: localhost
>
> gives
>
> TASK [debug] 
> ok: [test_01] =>
> ansible_connection: ssh
>
> TASK [debug]
> ok: [test_01 -> localhost] =>
> ansible_connection: local
>
> See DEFAULT_TRANSPORT
>
> https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-transport
>
> "man ansible" says
>
> -v, --verbose
> verbose mode (-vvv for more, - to enable connection
> debugging)
>
> For example
>
> shell> ansible-playbook pb.yml - | grep connection
> connection: smart
> ansible_connection: ssh
> ansible_connection: local
>
> -- 
> Vladimir Botka
>

-- 
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/afad6ea3-0480-4314-8abc-d496625ede46n%40googlegroups.com.


Re: [ansible-project] [WARNING]: Unhandled error in Python interpreter....

2020-11-13 Thread Vladimir Botka
On Thu, 12 Nov 2020 15:13:37 -0800 (PST)
bill paxton  wrote:

> I have a task that works fine for Ansible 2.9.7, but fails when I upgrade 
> to 2.10.3.
> ...
> Data could not be sent to remote host "localhost". Make sure this host can 
> be reached over ssh: ssh: connect to host localhost port 22: Cannot assign 
> requested address

FWIW, I'm still on 2.9.6.

As a hint, try to find out why *ssh* connection plugin is used to
connect localhost. IMHO, the default is *local*. For example, testing
with no configuration of the connection ("cat hosts | grep
connection" shows nothing)

  shell> cat pb.yml
  - hosts: test_01
tasks:
  - debug:
  var: ansible_connection
  - debug:
  var: ansible_connection
delegate_to: localhost

gives

  TASK [debug] 
  ok: [test_01] =>
ansible_connection: ssh

  TASK [debug]
  ok: [test_01 -> localhost] =>
ansible_connection: local

See DEFAULT_TRANSPORT
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-transport

"man ansible" says

  -v, --verbose
  verbose mode (-vvv for more, - to enable connection
  debugging)

For example

  shell> ansible-playbook pb.yml - | grep connection
  connection: smart
ansible_connection: ssh
ansible_connection: local

-- 
Vladimir Botka

-- 
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/20201113093209.53e10381%40gmail.com.


pgpO0hkQWjAen.pgp
Description: OpenPGP digital signature


[ansible-project] [WARNING]: Unhandled error in Python interpreter....

2020-11-12 Thread bill paxton
I have a task that works fine for Ansible 2.9.7, but fails when I upgrade 
to 2.10.3.

```
yaml
- name: Ping ServiceNow IP Address
  shell: "ping -c 1 -w 5 {{ sn_ip_address | trim }}"
  ignore_errors: true
  register: ping_result_sn_ip_address_raw
   when: sn_ip_address | trim | ipv4
   failed_when: false
   changed_when: false
   delegate_to: localhost
```

When the task is run with Ansible 2.10.3, I receive:

[WARNING]: Unhandled error in Python interpreter discovery for host
some_snow_host: Failed to connect to the host via ssh: ssh: connect to host
localhost port 22: Cannot assign requested address
fatal: [some_snow_host]: UNREACHABLE! => {
"changed": false,
"unreachable": true
}

MSG:

Data could not be sent to remote host "localhost". Make sure this host can 
be reached over ssh: ssh: connect to host localhost port 22: Cannot assign 
requested address

*Note:* there are other tasks in the same playbook that use "delegate_to: 
localhost" that work fine, although those tasks are not using the "shell" 
module.

-- 
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/f611a043-754e-4853-863c-6cd7493f5a16n%40googlegroups.com.