Ansible passwordless login not working

3,954 views
Skip to first unread message

Yehuda Pinhas

unread,
Jan 14, 2020, 9:38:34 AM1/14/20
to Ansible Project
Hi!!
Here is my code on my /etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml file:
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts 
  ansible_useransible
  ansible_passansible

I want to disable the SSH authenticity of host check, and I dont want to use public and private keys for ssh.. I want to specify the username and password as modules/variables w/e...

Its not working I think ansible doesn't use the username and password ansible for some reason.





This is my error:

[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml

PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************

TASK [Gathering Facts] ********************************************************************************************************************
ok: [R-TEST-SNIF]

TASK [include_vars] ***********************************************************************************************************************
ok: [R-TEST-SNIF]

TASK [include_role : new_vlan] ************************************************************************************************************

TASK [new_vlan : ---------------   1. Show VLAN   ----------------------] *****************************************************************
fatal: [R-TEST-SNIF]: FAILED! => {"changed": false, "msg": "command timeout triggered, timeout value is 10 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}

PLAY RECAP ********************************************************************************************************************************
R-TEST-SNIF                : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ 
[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml -vvvvv
ansible-playbook 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/POC_ENV.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/SNIF_AGGREGATOR.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/SNIF_AGGREGATOR.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/SNIF_AGGREGATOR.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/avaya.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/avaya.yml as it did not pass its verify_file() method
Skipping empty key (hosts) in group (avaya)
Parsed /etc/ansible/inventory/avaya.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/branch_switch.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/branch_switch.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/branch_switch.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/nexus.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/nexus.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/nexus.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_IPVPN_20M_50M.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_IPVPN_20M_50M.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/snif_router_IPVPN_20M_50M.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_IPVPN_8M_10M_200M.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_IPVPN_8M_10M_200M.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/snif_router_IPVPN_8M_10M_200M.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_SoM_10M.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_SoM_10M.yml as it did not pass its verify_file() method
Skipping empty key (hosts) in group (snif_router_SoM_10M)
Parsed /etc/ansible/inventory/snif_router_SoM_10M.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_SoM_20M.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_SoM_20M.yml as it did not pass its verify_file() method
Skipping empty key (hosts) in group (snif_router_SoM_20M)
Parsed /etc/ansible/inventory/snif_router_SoM_20M.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_SoM_40M.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_SoM_40M.yml as it did not pass its verify_file() method
Skipping empty key (hosts) in group (snif_router_SoM_40M)
Parsed /etc/ansible/inventory/snif_router_SoM_40M.yml inventory source with yaml plugin
setting up inventory plugins
host_list declined parsing /etc/ansible/inventory/snif_router_all.yml as it did not pass its verify_file() method
script declined parsing /etc/ansible/inventory/snif_router_all.yml as it did not pass its verify_file() method
Parsed /etc/ansible/inventory/snif_router_all.yml inventory source with yaml plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: new_vlan_playbook.yml ***********************************************************************************************************
Positional arguments: new_vlan_playbook.yml
become_method: sudo
inventory: (u'/etc/ansible/inventory',)
forks: 5
tags: (u'all',)
verbosity: 5
connection: smart
timeout: 10
1 plays in new_vlan_playbook.yml

PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************

TASK [Gathering Facts] ********************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:2
<R-TEST-SNIF> ESTABLISH LOCAL CONNECTION FOR USER: ansible
<R-TEST-SNIF> EXEC /bin/sh -c 'echo ~ansible && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916 `" && echo ansible-tmp-1579011787.69-262973864235916="` echo /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916 `" ) && sleep 0'
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/namespace.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/ansible_collector.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/default_collectors.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/text/formatters.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/validation.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/text/converters.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/text/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/process.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/_utils.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/_collections_compat.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/_json_compat.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/sys_info.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/parameters.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/file.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/common/collections.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/distro/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/distro/_distro.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/collector.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/timeout.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/darwin.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/other/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/linux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/ssh_pub_keys.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/aix.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/dragonfly.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/hurd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/linux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/darwin.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/date_time.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/dragonfly.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/hurd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/lsb.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/hpux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/apparmor.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/sunos.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/pkg_mgr.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/local.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/freebsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/netbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/sunos.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/base.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/freebsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/hpux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/netbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/python.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/caps.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/dragonfly.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/env.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/netbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/linux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/chroot.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/platform.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/fips.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/hpux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/openbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/other/ohai.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/dns.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/service_mgr.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/base.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sunos.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/aix.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/fc_wwn.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/cmdline.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/hardware/openbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/base.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/iscsi.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/freebsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/openbsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/other/facter.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/distribution.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/nvme.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/selinux.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/system/user.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/__init__.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/sysctl.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/utils.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/network/generic_bsd.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/virtual/sysctl.py
Using module_utils file /usr/lib/python2.7/site-packages/ansible/module_utils/facts/compat.py
<R-TEST-SNIF> Attempting python interpreter discovery
<R-TEST-SNIF> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<R-TEST-SNIF> PUT /home/ansible/.ansible/tmp/ansible-local-156625RNjI0/tmpBQvzzK TO /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916/AnsiballZ_setup.py
<R-TEST-SNIF> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916/ /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916/AnsiballZ_setup.py && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916/AnsiballZ_setup.py && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1579011787.69-262973864235916/ > /dev/null 2>&1 && sleep 0'
ok: [R-TEST-SNIF]
META: ran handlers

TASK [include_vars] ***********************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:6
ok: [R-TEST-SNIF] => {
    "ansible_facts": {
        "CONFIG_STATE": "absent", 
        "IP_ADDRESS": "{{ network_subnet ~ HOST_IP.stdout[0] }}", 
        "ansible_pass": "ansible", 
        "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts", 
        "ansible_user": "ansible", 
        "network_subnet": "10.3.84.", 
        "vlan_id": 384, 
        "vlan_name": "TEST_VLAN_TEST"
    }, 
    "ansible_included_var_files": [
        "/etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml"
    ], 
    "changed": false
}

TASK [include_role : new_vlan] ************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:8

TASK [new_vlan : ---------------   1. Show VLAN   ----------------------] *****************************************************************
task path: /etc/ansible/roles/new_vlan/tasks/show_vlan.yml:2
<R-TEST-SNIF> using connection plugin network_cli (was local)
<R-TEST-SNIF> starting connection from persistent connection plugin
<R-TEST-SNIF> local domain socket does not exist, starting it
<R-TEST-SNIF> control socket path is /home/ansible/.ansible/pc/e561de4eb0
<R-TEST-SNIF> local domain socket listeners started successfully
<R-TEST-SNIF> loaded cliconf plugin ios from path /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py for network_os ios
<R-TEST-SNIF> 
<R-TEST-SNIF> local domain socket path is /home/ansible/.ansible/pc/e561de4eb0
<R-TEST-SNIF> socket_path: /home/ansible/.ansible/pc/e561de4eb0
fatal: [R-TEST-SNIF]: FAILED! => {
    "changed": false, 
    "msg": "command timeout triggered, timeout value is 10 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."
}

PLAY RECAP ********************************************************************************************************************************
R-TEST-SNIF                : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

 

What am I missing here?

Vladimir Botka

unread,
Jan 14, 2020, 11:34:02 AM1/14/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Tue, 14 Jan 2020 06:38:34 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> *Here is my code on my /etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml
> file:*
> ansible_ssh_common_args:
> -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
> ansible_user: ansible
> ansible_pass: ansible

`ansible_password` is the correct name of the variable. See "Common inventory
variables"
https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html?highlight=password#common-inventory-variables

HTH,

-vlado
Message has been deleted

Yehuda Pinhas

unread,
Jan 15, 2020, 2:30:43 AM1/15/20
to Ansible Project
Hi,
Thank you for your answer. but its still not working

This is how my code looks like now:
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts 
  ansible_useransible
  ansible_passwordansible

And here is my error now:

<R-TEST-SNIF> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192 `" && echo ansible-tmp-1579073125.22-63076351266192="` echo /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192 `" ) && sleep 0'
<R-TEST-SNIF> PUT /home/ansible/.ansible/tmp/ansible-local-22981usJaee/tmp0xLmpP TO /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192/AnsiballZ_setup.py
<R-TEST-SNIF> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192/ /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192/AnsiballZ_setup.py && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192/AnsiballZ_setup.py && sleep 0'
<R-TEST-SNIF> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1579073125.22-63076351266192/ > /dev/null 2>&1 && sleep 0'
ok: [R-TEST-SNIF]
META: ran handlers

TASK [include_vars] ***********************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:6
ok: [R-TEST-SNIF] => {
    "ansible_facts": {
        "CONFIG_STATE": "absent", 
        "IP_ADDRESS": "{{ network_subnet ~ HOST_IP.stdout[0] }}", 
        "ansible_password": "ansible", 
        "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts", 
        "ansible_user": "ansible", 
        "network_subnet": "10.3.84.", 
        "vlan_id": 384, 
        "vlan_name": "TEST_VLAN_TEST"
    }, 
    "ansible_included_var_files": [
        "/etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml"
    ], 
    "changed": false
}

TASK [include_role : new_vlan] ************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:8

TASK [new_vlan : ---------------   1. Show VLAN   ----------------------] *****************************************************************
task path: /etc/ansible/roles/new_vlan/tasks/show_vlan.yml:2
<R-TEST-SNIF> using connection plugin network_cli (was local)
<R-TEST-SNIF> starting connection from persistent connection plugin
<R-TEST-SNIF> local domain socket does not exist, starting it
<R-TEST-SNIF> control socket path is /home/ansible/.ansible/pc/daa8eb0c20
<R-TEST-SNIF> local domain socket listeners started successfully
<R-TEST-SNIF> loaded cliconf plugin ios from path /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py for network_os ios
<R-TEST-SNIF> 
<R-TEST-SNIF> local domain socket path is /home/ansible/.ansible/pc/daa8eb0c20
<R-TEST-SNIF> socket_path: /home/ansible/.ansible/pc/daa8eb0c20

Vladimir Botka

unread,
Jan 15, 2020, 4:15:26 AM1/15/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Tue, 14 Jan 2020 23:30:43 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> <R-TEST-SNIF> using connection plugin network_cli (was local)
> [...]
> fatal: [R-TEST-SNIF]: FAILED! => {
> "changed": false,
> "msg": "command timeout triggered, timeout value is 10 secs.\nSee the
> timeout setting options in the Network Debug and Troubleshooting Guide."
> }

What is the device that's making troubles?

Make sure the device is working with the connection plugin 'network_cli'.
See "How Network Automation is Different"
https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html#how-network-automation-is-different
and in particular "Multiple Communication Protocols"
https://docs.ansible.com/ansible/latest/network/getting_started/network_differences.html#multiple-communication-protocols

-vlado
Message has been deleted

Yehuda Pinhas

unread,
Jan 15, 2020, 4:26:07 AM1/15/20
to Ansible Project

Hi Vladimir,
The device is a router, and I have made few more checks:
1. If im sshing normaly with ansible:ansible credentials it works
2. If im installing ssh keypair (publickey on the router) the ansible is working.
 
Problem occurs once I take off the public key from the router and try to ssh with username + password instead of username + pubkey.


I have even tryed to add the ansible_connection feature like this:
  ansible_connectionnetwork_cli
  ansible_network_osios
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts 
  ansible_useransible
  ansible_passwordansible

And this is the error:

Capture.PNG



I have no idea what to do

Vladimir Botka

unread,
Jan 15, 2020, 6:05:20 AM1/15/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Wed, 15 Jan 2020 01:26:07 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> The device is a router

Sure it is. Could you disclose the brand and type?

> 1. If im sshing normaly with ansible:ansible credentials it works
> 2. If im installing ssh keypair (publickey on the router) the ansible is
> working.

It's seems that the problem might be isolated.

'Gathering_Facts' and 'include_vars' was 'OK'. Then the play failed. Find out
which variable, from the included variables, changed and made the play fail

/etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml

-vlado

Yehuda Pinhas

unread,
Jan 15, 2020, 6:56:14 AM1/15/20
to Ansible Project
Oh. of course.
The router is virtual image - IOL.
Cisco IOS Software Version 15.4(1)T (I86BI_LINUX-ADVENTERPRISEK9-M)

Full code is:

/etc/ansible/roles/new_vlan/new_vlan_playbook.yml:
---
  - name---------------   1. Applying Layer 2 Configuration   ---------------
    hostsSnif_TEST
    connectionlocal
    tasks:
    - include_vars:
        dir/etc/ansible/roles/new_vlan/vars/
    - include_role:
        namenew_vlan
        tasks_fromshow_vlan.yml

/etc/ansible/roles/new_vlan/tasks/show_vlan.yml
---
  - name---------------   1. Show VLAN   ----------------------
    ios_command:
      commands
        - show ip int br
    registershow_vlan

  - debugmsg="{{ show_vlan.stdout_lines }}"

 /etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts 
  ansible_useransible
  ansible_passwordansible

/etc/ansible/inventory/POC_ENV.yml
all:
  children:
    POC_ENV:
      hosts:
        TEST-NXOS2:
        TEST-NXOS3:
    Snif_TEST:
      hosts:
        R-TEST-SNIF:

Ill mention again that when i add this configuration on the router ansible works perfectly:

  ip ssh pubkey-chain

  username ansible

  key-string

  ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDuKpCznL9Gb7L/jVypzsHxFcceKBL2Xg0Enjr5XnGtaAsycD+ToiXYANzn2J21z3IqxyVG7NELLkW03CCclBVMCkdbzD8sRaVuIZCjYdzD4KX7O8goBXnz0+sPO4FhccSBhMfAO/IphliQ0oFBM26OG8UsxZISI5/04GdObk6AwM7jDk6Fga1Wcmqpo0P2XfarXckbL0LxAYEaGr5JR6X4p

n+0x4C/DuOIIKQuvDyiaWTlD+ewRW6kMUUgo8AnVcHekZG+7GDzS4yVuAKZ73pl+Pe8EBa2eUP4FSE1ZXqnQvunKyGo7ifrZCcbikAnkB2is48Y67E3c21ZxhSkI36P ansible@Netauto-Dev


What do you think?






Vladimir Botka

unread,
Jan 15, 2020, 8:07:09 AM1/15/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Wed, 15 Jan 2020 03:56:14 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> *Cisco IOS Software Version 15.4(1)T (I86BI_LINUX-ADVENTERPRISEK9-M)*

Cisco IOS is supported platform
https://access.redhat.com/articles/3168091

> - name:
> hosts: Snif_TEST
> connection: local

The connection should be 'network_cli'. See "Ansible Network Examples"
https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html#ansible-network-examples
and "Privilege escalation" in particular
https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html#privilege-escalation

- name:
hosts: Snif_TEST
connection: network_cli

HTH,

-vlado

Yehuda Pinhas

unread,
Jan 15, 2020, 8:36:24 AM1/15/20
to Ansible Project
Hi Vladimir,

with this code on the playbook:
---
  - name---------------   1. Applying Layer 2 Configuration   ---------------
    hostsSnif_TEST
    connectionnetwork_cli
    tasks:
    - include_vars:
        dir/etc/ansible/roles/new_vlan/vars/
    - include_role:
        namenew_vlan
        tasks_fromshow_vlan.yml

And on the vars file:
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts  
ansible_useransible
  ansible_passwordansible

This is the result:
[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml

PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************

TASK [Gathering Facts] ********************************************************************************************************************
fatal: [R-TEST-SNIF]: FAILED! => {"msg": "Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host"}




With this code on the playbook:
---
  - name---------------   1. Applying Layer 2 Configuration   ---------------
    hostsSnif_TEST
    tasks:
    - include_vars:
        dir/etc/ansible/roles/new_vlan/vars/
    - include_role:
        namenew_vlan
        tasks_fromshow_vlan.yml

And on the vars file:
  ansible_ssh_common_args-o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts  
  ansible_connectionnetwork_cli
  ansible_network_osios
  ansible_useransible
  ansible_passwordansible

This is the result:
[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml

PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************

TASK [Gathering Facts] ********************************************************************************************************************
fatal: [R-TEST-SNIF]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\nPermission denied (publickey,keyboard-interactive,password).", "unreachable": true}

PLAY RECAP ********************************************************************************************************************************
R-TEST-SNIF                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   


Keep in mind that in anytime I have no problem with sshing to the machine. example:

Capture.PNG

Also remember that I always can add the pubkey configuration to the router and run ansible successfuly.

Have any idea what to do next?

Vladimir Botka

unread,
Jan 15, 2020, 11:23:28 AM1/15/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Wed, 15 Jan 2020 05:36:23 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> fatal: [R-TEST-SNIF]: UNREACHABLE! => {"changed": false, "msg": "Failed to
> connect to the host via ssh: Warning: Permanently added
> 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\nPermission
> denied (publickey,keyboard-interactive,password).", "unreachable": true}

It's SSH problem now. Find out why 'password' permission was denied.

See "Network Debug and Troubleshooting Guide"
https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html#network-debug-and-troubleshooting-guide

and "Enabling Networking device interaction logging" in particular
https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging

HTH,

-vlado
Message has been deleted

Yehuda Pinhas

unread,
Jan 16, 2020, 4:47:04 AM1/16/20
to Ansible Project
I have no idea what to do next.. also ping check fails..

Capture.PNG


Again, if im adding the publickey for passwordless authentication Ansible works.. but without it its not..

This is the configuration on the router side:
R-TEST-SNIF#sh run
Building configuration...

Current configuration : 1474 bytes
!
! Last configuration change at 07:42:41 EST Wed Jan 15 2020
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R-TEST-SNIF
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
!
no aaa new-model
clock timezone EST -5 0
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
!


!
!
!
!
ip domain name EVE
ip cef    
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
username ansible privilege 15 password 0 ansible
!
redundancy
!
!
ip ssh version 2
!
!
!
!
!         
!
!
!
!
!

!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
 exec-timeout 0 0
 logging synchronous
 login local
 transport input telnet ssh
 transport output telnet ssh
!
!
end

crypto key rsa generate proof:
R-TEST-SNIF#  show crypto key mypubkey rsa
% Key pair was generated at: 05:35:04 EST Jan 15 2020
Key name: R-TEST-SNIF.EVE
Key type: RSA KEYS
 Storage Device: private-config
 Usage: General Purpose Key
 Key is not exportable.
 Key Data:
  307C300D 06092A86 4886F70D 01010105 00036B00 30680261 00A5F2FB C8D19FA7 
  E19B9A1E 92976C47 174482FA 788CEA72 85AEF6E9 F0336651 CFE2DA99 316C94A2 
  45A9C27F A2E37D40 C2EE2A39 81B2C4C9 E3BB751C 20CD8C2A 1A632617 AE46F329 
  05CC6D09 483607CB 20DBC972 C2A92124 63FD1EFB E9A66E8C 07020301 0001
% Key pair was generated at: 05:35:04 EST Jan 15 2020
Key name: R-TEST-SNIF.EVE.server
Key type: RSA KEYS
Temporary key
 Usage: Encryption Key
 Key is not exportable.
 Key Data:
  306C300D 06092A86 4886F70D 01010105 00035B00 30580251 00AC4D25 1A615FB6 
  1FFEFF70 1A0C72A8 C9C26E3A C4F9AA7D 8C47CE5B 0FCC59A7 CADA0BC8 C173D620 
  26E5445E 65BBAAF2 915B844C 71B0D855 ADB5BBBC 68314F14 3F891C0D 8162B869 
  C227A0B0 C4592A93 5F020301 0001

Its probably some command missing on the router side.. 
anyone have any idea what is missing?

Douglas Evert

unread,
Jan 16, 2020, 4:59:05 AM1/16/20
to ansible...@googlegroups.com
When adding a public key are you adding it to an amiable user or to another user and does your ping work if you pass —ask-pass?

Sent from my iPhone

On Jan 16, 2020, at 04:36, Yehuda Pinhas <yuda....@gmail.com> wrote:


I'm not sure that  "connection: network_cli" because not matter what i do I get the same error... Its just not working.


How is it SSH problem if I can add a public key or just regulary SSH and its working? that proves that its not an SSH problem on my remote machine and leaves the fault in the ansible code side..

Any other ideas?

--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b9eb97d9-87d6-48fe-8077-4f0b3c78f3dd%40googlegroups.com.

Yehuda Pinhas

unread,
Jan 16, 2020, 5:02:47 AM1/16/20
to Ansible Project
Hi Douglas,
This is the result of --ask-pass:

Capture.PNG



I have no idea what that means haha. What do you think?

Vladimir Botka

unread,
Jan 16, 2020, 6:11:08 AM1/16/20
to Yehuda Pinhas, ansible...@googlegroups.com
On Thu, 16 Jan 2020 01:36:28 -0800 (PST)
Yehuda Pinhas <yuda....@gmail.com> wrote:

> How is it SSH problem if I can add a public key or just regulary SSH and
> its working?

SSH tried (publickey,keyboard-interactive,password) and failed

> fatal: [R-TEST-SNIF]: UNREACHABLE! => {"changed": false, "msg": "Failed to
> connect to the host via ssh: Warning: Permanently added
> 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\nPermission
> denied (publickey,keyboard-interactive,password).", "unreachable": true}

I can only repeat: Find out why 'password' permission was denied.
Quoting: "Ansible 2.8 features added logging of device interaction in log
file to help diagnose and troubleshoot issues regarding Ansible Networking
modules."

If you want to proceed in a systemic way get the log.

-vlado
Message has been deleted

Yehuda Pinhas

unread,
Jan 16, 2020, 7:49:02 AM1/16/20
to Ansible Project
Very well.
The debug output from the log file:

[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml -vvvv >> /etc/ansible/ansible.log
 39129 1579178690.27071: starting run
ansible-playbook 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
2020-01-16 14:44:50,551 p=ansible u=39129 | ansible-playbook 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /etc/ansible/ansible.cfg as config file
2020-01-16 14:44:50,551 p=ansible u=39129 | Using /etc/ansible/ansible.cfg as config file
 39129 1579178690.55257: Added group all to inventory
 39129 1579178690.55266: Added group ungrouped to inventory
 39129 1579178690.55276: Group all now contains ungrouped
 39129 1579178690.55286: Examining possible inventory source: /etc/ansible/inventory
 39129 1579178690.55293: Searching for inventory files in directory: /etc/ansible/inventory
 39129 1579178690.55305: Considering POC_ENV.yml
 39129 1579178690.55312: Examining possible inventory source: /etc/ansible/inventory/POC_ENV.yml
setting up inventory plugins
2020-01-16 14:44:50,553 p=ansible u=39129 | setting up inventory plugins
 39129 1579178690.55562: trying /usr/share/ansible/plugins/cache
 39129 1579178690.55574: trying /usr/lib/python2.7/site-packages/ansible/plugins/cache
 39129 1579178690.55698: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache)
 39129 1579178690.55807: trying /usr/share/ansible/plugins/inventory
 39129 1579178690.55818: trying /usr/lib/python2.7/site-packages/ansible/plugins/inventory
 39129 1579178690.56026: Loading InventoryModule 'host_list' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56164: Loaded config def from plugin (inventory/script)
 39129 1579178690.56174: Loading InventoryModule 'script' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56233: Loading InventoryModule 'auto' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56354: Loaded config def from plugin (inventory/yaml)
 39129 1579178690.56364: Loading InventoryModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56458: Loading InventoryModule 'ini' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56537: Loading InventoryModule 'toml' from /usr/lib/python2.7/site-packages/ansible/plugins/inventory/toml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/inventory:/usr/share/ansible/plugins/inventory)
 39129 1579178690.56548: Attempting to use plugin host_list (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/host_list.py)
host_list declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-16 14:44:50,565 p=ansible u=39129 | host_list declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
 39129 1579178690.56577: Attempting to use plugin script (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/script.py)
script declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-16 14:44:50,565 p=ansible u=39129 | script declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
 39129 1579178690.56608: Attempting to use plugin auto (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py)
 39129 1579178690.56621: Loading data from /etc/ansible/inventory/POC_ENV.yml
 39129 1579178690.56748: /etc/ansible/inventory/POC_ENV.yml was not parsable by auto
 39129 1579178690.56791: Attempting to use plugin yaml (/usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py)
 39129 1579178690.56969: Loading data from /etc/ansible/inventory/POC_ENV.yml
 39129 1579178690.57097: group all already in inventory
 39129 1579178690.57107: Added group POC_ENV to inventory
 39129 1579178690.57124: set inventory_file for TEST-NXOS3
 39129 1579178690.57135: set inventory_dir for TEST-NXOS3
 39129 1579178690.57143: Added host TEST-NXOS3 to inventory
 39129 1579178690.57151: Added host TEST-NXOS3 to group POC_ENV
 39129 1579178690.57160: set inventory_file for TEST-NXOS2
 39129 1579178690.57170: set inventory_dir for TEST-NXOS2
 39129 1579178690.57177: Added host TEST-NXOS2 to inventory
 39129 1579178690.57184: Added host TEST-NXOS2 to group POC_ENV
 39129 1579178690.57194: Group all now contains POC_ENV
 39129 1579178690.57202: Added group Snif_TEST to inventory
 39129 1579178690.57212: set inventory_file for R-TEST-SNIF
 39129 1579178690.57222: set inventory_dir for R-TEST-SNIF
 39129 1579178690.57227: Added host R-TEST-SNIF to inventory
 39129 1579178690.57234: Added host R-TEST-SNIF to group Snif_TEST
 39129 1579178690.57246: Group all now contains Snif_TEST
Parsed /etc/ansible/inventory/POC_ENV.yml inventory source with yaml plugin
2020-01-16 14:44:50,572 p=ansible u=39129 | Parsed /etc/ansible/inventory/POC_ENV.yml inventory source with yaml plugin
 39129 1579178690.57271: parsed /etc/ansible/inventory/POC_ENV.yml as True
 39129 1579178691.33064: Reconcile groups and hosts in inventory.
 39129 1579178691.33339: Loading CacheModule 'memory' from /usr/lib/python2.7/site-packages/ansible/plugins/cache/memory.py (searched paths: /usr/share/ansible/plugins/cache:/usr/lib/python2.7/site-packages/ansible/plugins/cache) (found_in_cache=True, class_only=False)
 39129 1579178691.36365: Loaded config def from plugin (connection/buildah)
 39129 1579178691.36402: Loading Connection 'buildah' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.py (found_in_cache=False, class_only=True)
 39129 1579178691.36807: Loaded config def from plugin (connection/chroot)
 39129 1579178691.36831: Loading Connection 'chroot' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.py (found_in_cache=False, class_only=True)
 39129 1579178691.38047: Loaded config def from plugin (connection/docker)
 39129 1579178691.38076: Loading Connection 'docker' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/docker.py (found_in_cache=False, class_only=True)
 39129 1579178691.38284: Loaded config def from plugin (connection/funcd)
 39129 1579178691.49180: Loaded config def from plugin (connection/httpapi)
 39129 1579178691.49216: Loading Connection 'httpapi' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/httpapi.py (found_in_cache=False, class_only=True)
 39129 1579178691.49511: Loaded config def from plugin (connection/iocage)
 39129 1579178691.49535: Loading Connection 'iocage' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/iocage.py (found_in_cache=False, class_only=True)
 39129 1579178691.49718: Loaded config def from plugin (connection/jail)
 39129 1579178691.49745: Loading Connection 'jail' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/jail.py (found_in_cache=False, class_only=True)
 39129 1579178691.50956: Loaded config def from plugin (connection/kubectl)
 39129 1579178691.50981: Loading Connection 'kubectl' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.py (found_in_cache=False, class_only=True)
 39129 1579178691.51183: Loaded config def from plugin (connection/libvirt_lxc)
 39129 1579178691.51207: Loading Connection 'libvirt_lxc' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/libvirt_lxc.py (found_in_cache=False, class_only=True)
 39129 1579178691.51355: Loading Connection 'local' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/local.py (found_in_cache=False, class_only=True)
 39129 1579178691.51625: Loaded config def from plugin (connection/lxc)
 39129 1579178691.51651: Loading Connection 'lxc' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.py (found_in_cache=False, class_only=True)
 39129 1579178691.51889: Loaded config def from plugin (connection/lxd)
 39129 1579178691.51912: Loading Connection 'lxd' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxd.py (found_in_cache=False, class_only=True)
 39129 1579178691.52867: Loaded config def from plugin (connection/napalm)
 39129 1579178691.52891: Loading Connection 'napalm' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/napalm.py (found_in_cache=False, class_only=True)
 39129 1579178691.54388: Loaded config def from plugin (connection/netconf)
 39129 1579178691.54415: Loading Connection 'netconf' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/netconf.py (found_in_cache=False, class_only=True)
 39129 1579178691.56582: Loaded config def from plugin (connection/network_cli)
 39129 1579178691.56616: Loading Connection 'network_cli' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py (found_in_cache=False, class_only=True)
 39129 1579178691.57648: Loaded config def from plugin (connection/oc)
 39129 1579178691.57675: Loading Connection 'oc' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/oc.py (found_in_cache=False, class_only=True)
 39129 1579178691.58864: Loaded config def from plugin (connection/paramiko_ssh)
 39129 1579178691.58889: Loading Connection 'paramiko_ssh' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/paramiko_ssh.py (found_in_cache=False, class_only=True)
 39129 1579178691.63876: Loaded config def from plugin (connection/persistent)
 39129 1579178691.63900: Loading Connection 'persistent' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/persistent.py (found_in_cache=False, class_only=True)
 39129 1579178691.64145: Loaded config def from plugin (connection/podman)
 39129 1579178691.64169: Loading Connection 'podman' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/podman.py (found_in_cache=False, class_only=True)
 39129 1579178691.66449: Loaded config def from plugin (connection/psrp)
 39129 1579178691.66461: Loading Connection 'psrp' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/psrp.py (found_in_cache=False, class_only=True)
 39129 1579178691.66594: Loaded config def from plugin (connection/qubes)
 39129 1579178691.66614: Loading Connection 'qubes' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/qubes.py (found_in_cache=False, class_only=True)
 39129 1579178691.66779: Loading Connection 'saltstack' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/saltstack.py (found_in_cache=False, class_only=True)
 39129 1579178691.68660: Loaded config def from plugin (connection/ssh)
 39129 1579178691.68672: Loading Connection 'ssh' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
 39129 1579178691.69651: Loaded config def from plugin (connection/vmware_tools)
 39129 1579178691.69662: Loading Connection 'vmware_tools' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/vmware_tools.py (found_in_cache=False, class_only=True)
 39129 1579178691.70344: Loaded config def from plugin (connection/winrm)
 39129 1579178691.70356: Loading Connection 'winrm' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py (found_in_cache=False, class_only=True)
 39129 1579178691.70551: Loaded config def from plugin (connection/zone)
 39129 1579178691.70574: Loading Connection 'zone' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/zone.py (found_in_cache=False, class_only=True)
 39129 1579178691.71318: trying /usr/share/ansible/plugins/doc_fragments
 39129 1579178691.71332: trying /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments
 39129 1579178691.71951: Loading ModuleDocFragment 'shell_windows' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_windows.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
 39129 1579178691.72487: Loaded config def from plugin (shell/cmd)
 39129 1579178691.72512: Loading ShellModule 'cmd' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/cmd.py (found_in_cache=False, class_only=True)
 39129 1579178691.72705: Loading ModuleDocFragment 'shell_common' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_common.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
 39129 1579178691.73244: Loaded config def from plugin (shell/csh)
 39129 1579178691.73264: Loading ShellModule 'csh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/csh.py (found_in_cache=False, class_only=True)
 39129 1579178691.73463: Loading ModuleDocFragment 'shell_common' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_common.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.73961: Loaded config def from plugin (shell/fish)
 39129 1579178691.73981: Loading ShellModule 'fish' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/fish.py (found_in_cache=False, class_only=True)
 39129 1579178691.74087: Loading ModuleDocFragment 'shell_windows' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_windows.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.74367: Loaded config def from plugin (shell/powershell)
 39129 1579178691.74386: Loading ShellModule 'powershell' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=False, class_only=True)
 39129 1579178691.74489: Loading ModuleDocFragment 'shell_common' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/shell_common.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.75002: Loaded config def from plugin (shell/sh)
 39129 1579178691.75023: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=False, class_only=True)
 39129 1579178691.76212: Loaded config def from plugin (become/doas)
 39129 1579178691.76232: Loading BecomeModule 'doas' from /usr/lib/python2.7/site-packages/ansible/plugins/become/doas.py (found_in_cache=False, class_only=True)
 39129 1579178691.76730: Loaded config def from plugin (become/dzdo)
 39129 1579178691.76749: Loading BecomeModule 'dzdo' from /usr/lib/python2.7/site-packages/ansible/plugins/become/dzdo.py (found_in_cache=False, class_only=True)
 39129 1579178691.76943: Loaded config def from plugin (become/enable)
 39129 1579178691.76958: Loading BecomeModule 'enable' from /usr/lib/python2.7/site-packages/ansible/plugins/become/enable.py (found_in_cache=False, class_only=True)
 39129 1579178691.77530: Loaded config def from plugin (become/ksu)
 39129 1579178691.77548: Loading BecomeModule 'ksu' from /usr/lib/python2.7/site-packages/ansible/plugins/become/ksu.py (found_in_cache=False, class_only=True)
 39129 1579178691.78029: Loaded config def from plugin (become/machinectl)
 39129 1579178691.78047: Loading BecomeModule 'machinectl' from /usr/lib/python2.7/site-packages/ansible/plugins/become/machinectl.py (found_in_cache=False, class_only=True)
 39129 1579178691.78605: Loaded config def from plugin (become/pbrun)
 39129 1579178691.78621: Loading BecomeModule 'pbrun' from /usr/lib/python2.7/site-packages/ansible/plugins/become/pbrun.py (found_in_cache=False, class_only=True)
 39129 1579178691.79196: Loaded config def from plugin (become/pfexec)
 39129 1579178691.79212: Loading BecomeModule 'pfexec' from /usr/lib/python2.7/site-packages/ansible/plugins/become/pfexec.py (found_in_cache=False, class_only=True)
 39129 1579178691.79586: Loaded config def from plugin (become/pmrun)
 39129 1579178691.79602: Loading BecomeModule 'pmrun' from /usr/lib/python2.7/site-packages/ansible/plugins/become/pmrun.py (found_in_cache=False, class_only=True)
 39129 1579178691.80068: Loaded config def from plugin (become/runas)
 39129 1579178691.80086: Loading BecomeModule 'runas' from /usr/lib/python2.7/site-packages/ansible/plugins/become/runas.py (found_in_cache=False, class_only=True)
 39129 1579178691.80580: Loaded config def from plugin (become/sesu)
 39129 1579178691.80596: Loading BecomeModule 'sesu' from /usr/lib/python2.7/site-packages/ansible/plugins/become/sesu.py (found_in_cache=False, class_only=True)
 39129 1579178691.81168: Loaded config def from plugin (become/su)
 39129 1579178691.81185: Loading BecomeModule 'su' from /usr/lib/python2.7/site-packages/ansible/plugins/become/su.py (found_in_cache=False, class_only=True)
 39129 1579178691.81680: Loaded config def from plugin (become/sudo)
 39129 1579178691.81696: Loading BecomeModule 'sudo' from /usr/lib/python2.7/site-packages/ansible/plugins/become/sudo.py (found_in_cache=False, class_only=True)
 39129 1579178691.81795: Loading data from /etc/ansible/roles/new_vlan/new_vlan_playbook.yml
 39129 1579178691.83535: trying /usr/share/ansible/plugins/action
 39129 1579178691.83559: trying /usr/lib/python2.7/site-packages/ansible/plugins/action
 39129 1579178691.84895: trying /usr/share/ansible/plugins/callback
 39129 1579178691.84921: trying /usr/lib/python2.7/site-packages/ansible/plugins/callback
 39129 1579178691.85717: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments)
 39129 1579178691.86296: Loaded config def from plugin (callback/default)
 39129 1579178691.86321: Loading CallbackModule 'default' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback)
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
2020-01-16 14:44:51,863 p=ansible u=39129 | Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
 39129 1579178691.87006: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.87548: Loaded config def from plugin (callback/actionable)
 39129 1579178691.87570: Loading CallbackModule 'actionable' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/actionable.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.87717: Loading CallbackModule 'aws_resource_actions' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/aws_resource_actions.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.88015: Loaded config def from plugin (callback/cgroup_memory_recap)
 39129 1579178691.88041: Loading CallbackModule 'cgroup_memory_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_memory_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.89242: Loaded config def from plugin (callback/cgroup_perf_recap)
 39129 1579178691.89268: Loading CallbackModule 'cgroup_perf_recap' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/cgroup_perf_recap.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.89411: Loading CallbackModule 'context_demo' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/context_demo.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.89593: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.90106: Loaded config def from plugin (callback/counter_enabled)
 39129 1579178691.90129: Loading CallbackModule 'counter_enabled' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/counter_enabled.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.90278: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.90781: Loaded config def from plugin (callback/debug)
 39129 1579178691.90804: Loading CallbackModule 'debug' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/debug.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.90825: Loading CallbackModule 'default' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.91050: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.91574: Loaded config def from plugin (callback/dense)
 39129 1579178691.91596: Loading CallbackModule 'dense' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/dense.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.92271: Loaded config def from plugin (callback/foreman)
 39129 1579178691.92295: Loading CallbackModule 'foreman' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.92479: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178691.97173: Loaded config def from plugin (callback/full_skip)
 39129 1579178691.97192: Loading CallbackModule 'full_skip' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/full_skip.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.97523: Loaded config def from plugin (callback/grafana_annotations)
 39129 1579178691.97534: Loading CallbackModule 'grafana_annotations' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/grafana_annotations.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.97760: Loaded config def from plugin (callback/hipchat)
 39129 1579178691.97771: Loading CallbackModule 'hipchat' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/hipchat.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.97918: Loaded config def from plugin (callback/jabber)
 39129 1579178691.97929: Loading CallbackModule 'jabber' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/jabber.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.98030: Loaded config def from plugin (callback/json)
 39129 1579178691.98042: Loading CallbackModule 'json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.98332: Loaded config def from plugin (callback/junit)
 39129 1579178691.98344: Loading CallbackModule 'junit' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/junit.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.98444: Loaded config def from plugin (callback/log_plays)
 39129 1579178691.98454: Loading CallbackModule 'log_plays' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/log_plays.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.98677: Loaded config def from plugin (callback/logdna)
 39129 1579178691.98688: Loading CallbackModule 'logdna' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logdna.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.98993: Loaded config def from plugin (callback/logentries)
 39129 1579178691.99004: Loading CallbackModule 'logentries' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99140: Loaded config def from plugin (callback/logstash)
 39129 1579178691.99150: Loading CallbackModule 'logstash' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/logstash.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99480: Loaded config def from plugin (callback/mail)
 39129 1579178691.99492: Loading CallbackModule 'mail' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/mail.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99555: Loading CallbackModule 'minimal' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/minimal.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99789: Loaded config def from plugin (callback/nrdp)
 39129 1579178691.99799: Loading CallbackModule 'nrdp' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/nrdp.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99856: Loading CallbackModule 'null' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/null.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99913: Loading CallbackModule 'oneline' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/oneline.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178691.99990: Loading CallbackModule 'osx_say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/osx_say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00067: Loading CallbackModule 'profile_roles' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_roles.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00205: Loaded config def from plugin (callback/profile_tasks)
 39129 1579178692.00216: Loading CallbackModule 'profile_tasks' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/profile_tasks.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00288: Loading CallbackModule 'say' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/say.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00413: Loaded config def from plugin (callback/selective)
 39129 1579178692.00424: Loading CallbackModule 'selective' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/selective.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00501: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178692.00787: Loaded config def from plugin (callback/skippy)
 39129 1579178692.00797: Loading CallbackModule 'skippy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/skippy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.00991: Loaded config def from plugin (callback/slack)
 39129 1579178692.01002: Loading CallbackModule 'slack' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/slack.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.01131: Loaded config def from plugin (callback/splunk)
 39129 1579178692.01144: Loading CallbackModule 'splunk' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/splunk.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.01223: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178692.01640: Loaded config def from plugin (callback/stderr)
 39129 1579178692.01655: Loading CallbackModule 'stderr' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/stderr.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.01773: Loaded config def from plugin (callback/sumologic)
 39129 1579178692.01783: Loading CallbackModule 'sumologic' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/sumologic.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.02326: Loaded config def from plugin (callback/syslog_json)
 39129 1579178692.02353: Loading CallbackModule 'syslog_json' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/syslog_json.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.02487: Loading CallbackModule 'timer' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/timer.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.02669: Loading CallbackModule 'tree' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/tree.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.02851: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178692.03348: Loaded config def from plugin (callback/unixy)
 39129 1579178692.03359: Loading CallbackModule 'unixy' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/unixy.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)
 39129 1579178692.03570: Loading ModuleDocFragment 'default_callback' from /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/default_callback.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments:/usr/share/ansible/plugins/doc_fragments) (found_in_cache=True, class_only=False)
 39129 1579178692.04054: Loaded config def from plugin (callback/yaml)
 39129 1579178692.04064: Loading CallbackModule 'yaml' from /usr/lib/python2.7/site-packages/ansible/plugins/callback/yaml.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/callback:/usr/share/ansible/plugins/callback) (found_in_cache=False, class_only=True)

PLAYBOOK: new_vlan_playbook.yml ***********************************************************************************************************
2020-01-16 14:44:52,040 p=ansible u=39129 | PLAYBOOK: new_vlan_playbook.yml ***********************************************************************************************************
Positional arguments: new_vlan_playbook.yml
become_method: sudo
inventory: (u'/etc/ansible/inventory',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 10
1 plays in new_vlan_playbook.yml
2020-01-16 14:44:52,041 p=ansible u=39129 | 1 plays in new_vlan_playbook.yml
 39129 1579178692.04155: in VariableManager get_vars()
 39129 1579178692.04760: done with get_vars()
 39129 1579178692.04796: in VariableManager get_vars()
 39129 1579178692.04890: done with get_vars()
 39129 1579178692.04927: in VariableManager get_vars()
 39129 1579178692.05001: done with get_vars()

PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************
2020-01-16 14:44:52,050 p=ansible u=39129 | PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************
 39129 1579178692.05737: trying /usr/share/ansible/plugins/strategy
 39129 1579178692.05751: trying /usr/lib/python2.7/site-packages/ansible/plugins/strategy
 39129 1579178692.05821: Loading StrategyModule 'linear' from /usr/lib/python2.7/site-packages/ansible/plugins/strategy/linear.py (searched paths: /usr/share/ansible/plugins/strategy:/usr/lib/python2.7/site-packages/ansible/plugins/strategy)
 39129 1579178692.05909: getting the remaining hosts for this loop
 39129 1579178692.05935: done getting the remaining hosts for this loop
 39129 1579178692.05970: building list of next tasks for hosts
 39129 1579178692.05985: getting the next task for host R-TEST-SNIF
 39129 1579178692.06002: done getting next task for host R-TEST-SNIF
 39129 1579178692.06017:  ^ task is: TASK: Gathering Facts
 39129 1579178692.06033:  ^ state is: HOST STATE: block=0, task=0, rescue=0, always=0, run_state=ITERATING_SETUP, fail_state=FAILED_NONE, pending_setup=True, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 39129 1579178692.06052: done building task lists
 39129 1579178692.06063: counting tasks in each state of execution
 39129 1579178692.06077: done counting tasks in each state of execution:
num_setups: 1
num_tasks: 0
num_rescue: 0
num_always: 0
 39129 1579178692.06088: advancing hosts in ITERATING_SETUP
 39129 1579178692.06099: starting to advance hosts
 39129 1579178692.06118: getting the next task for host R-TEST-SNIF
 39129 1579178692.06147: done getting next task for host R-TEST-SNIF
 39129 1579178692.06168:  ^ task is: TASK: Gathering Facts
 39129 1579178692.06187:  ^ state is: HOST STATE: block=0, task=0, rescue=0, always=0, run_state=ITERATING_SETUP, fail_state=FAILED_NONE, pending_setup=True, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
 39129 1579178692.06200: done advancing hosts to next task
 39129 1579178692.06285: Loading ActionModule 'gather_facts' from /usr/lib/python2.7/site-packages/ansible/plugins/action/gather_facts.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=False, class_only=True)
 39129 1579178692.06303: getting variables
 39129 1579178692.06316: in VariableManager get_vars()
 39129 1579178692.06376: Calling all_inventory to load vars for R-TEST-SNIF
 39129 1579178692.06396: Calling groups_inventory to load vars for R-TEST-SNIF
 39129 1579178692.06416: Calling all_plugins_inventory to load vars for R-TEST-SNIF
 39129 1579178692.06601: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py
 39129 1579178692.06624: Calling all_plugins_play to load vars for R-TEST-SNIF
 39129 1579178692.06650: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 39129 1579178692.06673: Calling groups_plugins_inventory to load vars for R-TEST-SNIF
 39129 1579178692.06697: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 39129 1579178692.06718: Calling groups_plugins_play to load vars for R-TEST-SNIF
 39129 1579178692.06743: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 39129 1579178692.06787: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 39129 1579178692.06826: Loading VarsModule 'host_group_vars' from /usr/lib/python2.7/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
 39129 1579178692.07144: done with get_vars()
 39129 1579178692.07297: done getting variables
 39129 1579178692.07323: sending task start callback, copying the task so we can template it temporarily
 39129 1579178692.07340: done copying, going to template now
 39129 1579178692.07359: done templating
 39129 1579178692.07370: here goes the callback...

TASK [Gathering Facts] ********************************************************************************************************************
2020-01-16 14:44:52,074 p=ansible u=39129 | TASK [Gathering Facts] ********************************************************************************************************************
task path: /etc/ansible/roles/new_vlan/new_vlan_playbook.yml:2
 39129 1579178692.07453: sending task start callback
 39129 1579178692.07468: entering _queue_task() for R-TEST-SNIF/gather_facts
 39129 1579178692.07481: Creating lock for gather_facts
 39129 1579178692.07832: worker is 1 (out of 1 available)
 39129 1579178692.07890: exiting _queue_task() for R-TEST-SNIF/gather_facts
 39129 1579178692.07962: done queuing things up, now waiting for results queue to drain
 39129 1579178692.07970: waiting for pending results...
 39138 1579178692.08031: running TaskExecutor() for R-TEST-SNIF/TASK: Gathering Facts
 39138 1579178692.08127: in run() - task 005056a6-9ac8-7097-4aea-0000000004af
 39138 1579178692.08201: calling self._execute()
 39138 1579178692.08610: trying /usr/share/ansible/plugins/connection
 39138 1579178692.08628: trying /usr/lib/python2.7/site-packages/ansible/plugins/connection
 39138 1579178692.08811: Loading Connection 'ssh' from /usr/lib/python2.7/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/lib/python2.7/site-packages/ansible/plugins/connection:/usr/share/ansible/plugins/connection) (found_in_cache=True, class_only=False)
 39138 1579178692.08835: trying /usr/lib/python2.7/site-packages/ansible/plugins/shell
 39138 1579178692.08879: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 39138 1579178692.08895: Loading ShellModule 'sh' from /usr/lib/python2.7/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
 39138 1579178692.09179: Loading ActionModule 'gather_facts' from /usr/lib/python2.7/site-packages/ansible/plugins/action/gather_facts.py (searched paths: /usr/share/ansible/plugins/action:/usr/lib/python2.7/site-packages/ansible/plugins/action) (found_in_cache=True, class_only=False)
 39138 1579178692.09195: starting attempt loop
 39138 1579178692.09203: running the handler
 39138 1579178692.09253: _low_level_execute_command(): starting
 39138 1579178692.09267: _low_level_execute_command(): executing: /bin/sh -c 'echo ~ansible && sleep 0'
<R-TEST-SNIF> ESTABLISH SSH CONNECTION FOR USER: ansible
2020-01-16 14:44:52,092 p=ansible u=39138 | <R-TEST-SNIF> ESTABLISH SSH CONNECTION FOR USER: ansible
<R-TEST-SNIF> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ansible/.ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlPath=/home/ansible/.ansible/cp/9ff99d6f6c R-TEST-SNIF '/bin/sh -c '"'"'echo ~ansible && sleep 0'"'"''
2020-01-16 14:44:52,097 p=ansible u=39138 | <R-TEST-SNIF> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ansible/.ssh/id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ansible"' -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlPath=/home/ansible/.ansible/cp/9ff99d6f6c R-TEST-SNIF '/bin/sh -c '"'"'echo ~ansible && sleep 0'"'"''
 39138 1579178692.12046: stderr chunk (state=2):
>>>OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/home/ansible/.ansible/cp/9ff99d6f6c" does not exist
debug2: resolving "r-test-snif" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to r-test-snif [10.70.54.102] port 22.
debug2: fd 3 setting O_NONBLOCK
<<<
 39138 1579178692.12232: stderr chunk (state=3):
>>>debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 9998 ms remain after connect
<<<
 39138 1579178692.12293: stderr chunk (state=3):
>>>debug1: identity file /home/ansible/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ansible/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
<<<
 39138 1579178692.12460: stderr chunk (state=3):
>>>debug1: Remote protocol version 2.0, remote software version Cisco-1.25
debug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to r-test-snif:22 as 'ansible'
debug3: hostkeys_foreach: reading file "/dev/null"
<<<
 39138 1579178692.12521: stderr chunk (state=3):
>>>debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ssh-ed2551...@openssh.com,ssh-rsa-...@openssh.com,ssh-dss-...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss
debug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
debug2: compression ctos: zl...@openssh.com,zlib,none
debug2: compression stoc: zl...@openssh.com,zlib,none
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: diffie-hellman-group-exchange-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-cbc MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: aes128-cbc MAC: hmac-sha1 compression: none
debug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20
debug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20
debug3: send packet: type 34
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent
<<<
 39138 1579178692.33695: stderr chunk (state=3):
>>>debug3: receive packet: type 31
debug1: got SSH2_MSG_KEX_DH_GEX_GROUP
<<<
 39138 1579178692.34830: stderr chunk (state=3):
>>>debug2: bits set: 2064/4096
debug3: send packet: type 32
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
<<<
 39138 1579178692.41511: stderr chunk (state=3):
>>>debug3: receive packet: type 33
debug1: got SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: ssh-rsa SHA256:k4gYjX/xS7s2RKIGbUkctfOgNkolv5JubOYCx/9rbRw
debug3: hostkeys_foreach: reading file "/dev/null"
<<<
 39138 1579178692.41564: stderr chunk (state=3):
>>>debug3: hostkeys_foreach: reading file "/dev/null"
Warning: Permanently added 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.
debug2: bits set: 2048/4096
<<<
 39138 1579178692.42647: stderr chunk (state=3):
>>>debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug2: key: /home/ansible/.ssh/id_rsa (0x55fb9c5d71f0), explicit
debug3: send packet: type 5
<<<
 39138 1579178692.63247: stderr chunk (state=3):
>>>debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
<<<
 39138 1579178692.63397: stderr chunk (state=3):
>>>debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive,password
debug3: start over, passed a different list publickey,keyboard-interactive,password
debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
debug3: authmethod_lookup publickey
debug3: remaining preferred: ,gssapi-keyex,hostbased,publickey
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/ansible/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
<<<
 39138 1579178694.64301: stderr chunk (state=3):
>>>debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive,password
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive,password).
<<<
 39138 1579178694.64333: stdout chunk (state=3):
>>><<<
 39138 1579178694.64377: stderr chunk (state=3):
>>><<<
<R-TEST-SNIF> (255, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/ansible/.ansible/cp/9ff99d6f6c" does not exist\r\ndebug2: resolving "r-test-snif" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to r-test-snif [10.70.54.102] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9998 ms remain after connect\r\ndebug1: identity file /home/ansible/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/ansible/.ssh/id_rsa-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version Cisco-1.25\r\ndebug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to r-test-snif:22 as \'ansible\'\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ssh-ed2551...@openssh.com,ssh-rsa-...@openssh.com,ssh-dss-...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zl...@openssh.com,zlib,none\r\ndebug2: compression stoc: zl...@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha1\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: client->server cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug3: send packet: type 34\r\ndebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug2: bits set: 2064/4096\r\ndebug3: send packet: type 32\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Server host key: ssh-rsa SHA256:k4gYjX/xS7s2RKIGbUkctfOgNkolv5JubOYCx/9rbRw\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\nWarning: Permanently added \'r-test-snif,10.70.54.102\' (RSA) to the list of known hosts.\r\ndebug2: bits set: 2048/4096\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug2: key: /home/ansible/.ssh/id_rsa (0x55fb9c5d71f0), explicit\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug3: start over, passed a different list publickey,keyboard-interactive,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/ansible/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\nPermission denied (publickey,keyboard-interactive,password).\r\n')
2020-01-16 14:44:54,644 p=ansible u=39138 | <R-TEST-SNIF> (255, '', 'OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket "/home/ansible/.ansible/cp/9ff99d6f6c" does not exist\r\ndebug2: resolving "r-test-snif" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to r-test-snif [10.70.54.102] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9998 ms remain after connect\r\ndebug1: identity file /home/ansible/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/ansible/.ssh/id_rsa-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version Cisco-1.25\r\ndebug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to r-test-snif:22 as \'ansible\'\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ssh-ed2551...@openssh.com,ssh-rsa-...@openssh.com,ssh-dss-...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zl...@openssh.com,zlib,none\r\ndebug2: compression stoc: zl...@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha1\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: client->server cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug3: send packet: type 34\r\ndebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug2: bits set: 2064/4096\r\ndebug3: send packet: type 32\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Server host key: ssh-rsa SHA256:k4gYjX/xS7s2RKIGbUkctfOgNkolv5JubOYCx/9rbRw\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\ndebug3: hostkeys_foreach: reading file "/dev/null"\r\nWarning: Permanently added \'r-test-snif,10.70.54.102\' (RSA) to the list of known hosts.\r\ndebug2: bits set: 2048/4096\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug2: key: /home/ansible/.ssh/id_rsa (0x55fb9c5d71f0), explicit\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug3: start over, passed a different list publickey,keyboard-interactive,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/ansible/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\nPermission denied (publickey,keyboard-interactive,password).\r\n')
 39138 1579178694.64552: _execute() done
 39138 1579178694.64561: dumping result to json
 39138 1579178694.64568: done dumping result, returning
 39138 1579178694.64594: done running TaskExecutor() for R-TEST-SNIF/TASK: Gathering Facts [005056a6-9ac8-7097-4aea-0000000004af]
 39138 1579178694.64618: sending task result for task 005056a6-9ac8-7097-4aea-0000000004af
 39138 1579178694.64688: done sending task result for task 005056a6-9ac8-7097-4aea-0000000004af
 39138 1579178694.64702: WORKER PROCESS EXITING
fatal: [R-TEST-SNIF]: UNREACHABLE! => {
    "changed": false, 
    "msg": "Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/home/ansible/.ansible/cp/9ff99d6f6c\" does not exist\r\ndebug2: resolving \"r-test-snif\" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to r-test-snif [10.70.54.102] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9998 ms remain after connect\r\ndebug1: identity file /home/ansible/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/ansible/.ssh/id_rsa-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version Cisco-1.25\r\ndebug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to r-test-snif:22 as 'ansible'\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ssh-ed2551...@openssh.com,ssh-rsa-...@openssh.com,ssh-dss-...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zl...@openssh.com,zlib,none\r\ndebug2: compression stoc: zl...@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha1\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: client->server cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug3: send packet: type 34\r\ndebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug2: bits set: 2064/4096\r\ndebug3: send packet: type 32\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Server host key: ssh-rsa SHA256:k4gYjX/xS7s2RKIGbUkctfOgNkolv5JubOYCx/9rbRw\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\nWarning: Permanently added 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\ndebug2: bits set: 2048/4096\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug2: key: /home/ansible/.ssh/id_rsa (0x55fb9c5d71f0), explicit\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug3: start over, passed a different list publickey,keyboard-interactive,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/ansible/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\nPermission denied (publickey,keyboard-interactive,password).", 
    "unreachable": true
}
2020-01-16 14:44:54,651 p=ansible u=39129 | fatal: [R-TEST-SNIF]: UNREACHABLE! => {
    "changed": false, 
    "msg": "Failed to connect to the host via ssh: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug1: Control socket \"/home/ansible/.ansible/cp/9ff99d6f6c\" does not exist\r\ndebug2: resolving \"r-test-snif\" port 22\r\ndebug2: ssh_connect_direct: needpriv 0\r\ndebug1: Connecting to r-test-snif [10.70.54.102] port 22.\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 9998 ms remain after connect\r\ndebug1: identity file /home/ansible/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /home/ansible/.ssh/id_rsa-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.4\r\ndebug1: Remote protocol version 2.0, remote software version Cisco-1.25\r\ndebug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to r-test-snif:22 as 'ansible'\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c\r\ndebug2: host key algorithms: ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ecdsa-sha2-nis...@openssh.com,ssh-ed2551...@openssh.com,ssh-rsa-...@openssh.com,ssh-dss-...@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss\r\ndebug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: umac-...@openssh.com,umac-1...@openssh.com,hmac-sha...@openssh.com,hmac-sha...@openssh.com,hmac-s...@openssh.com,uma...@openssh.com,umac...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: zl...@openssh.com,zlib,none\r\ndebug2: compression stoc: zl...@openssh.com,zlib,none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: host key algorithms: ssh-rsa\r\ndebug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc\r\ndebug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96\r\ndebug2: compression ctos: none\r\ndebug2: compression stoc: none\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: diffie-hellman-group-exchange-sha1\r\ndebug1: kex: host key algorithm: ssh-rsa\r\ndebug1: kex: server->client cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: client->server cipher: aes128-cbc MAC: hmac-sha1 compression: none\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug1: kex: diffie-hellman-group-exchange-sha1 need=20 dh_need=20\r\ndebug3: send packet: type 34\r\ndebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent\r\ndebug3: receive packet: type 31\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_GROUP\r\ndebug2: bits set: 2064/4096\r\ndebug3: send packet: type 32\r\ndebug1: SSH2_MSG_KEX_DH_GEX_INIT sent\r\ndebug3: receive packet: type 33\r\ndebug1: got SSH2_MSG_KEX_DH_GEX_REPLY\r\ndebug1: Server host key: ssh-rsa SHA256:k4gYjX/xS7s2RKIGbUkctfOgNkolv5JubOYCx/9rbRw\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\ndebug3: hostkeys_foreach: reading file \"/dev/null\"\r\nWarning: Permanently added 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\ndebug2: bits set: 2048/4096\r\ndebug3: send packet: type 21\r\ndebug2: set_newkeys: mode 1\r\ndebug1: rekey after 4294967296 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: set_newkeys: mode 0\r\ndebug1: rekey after 4294967296 blocks\r\ndebug2: key: /home/ansible/.ssh/id_rsa (0x55fb9c5d71f0), explicit\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug3: start over, passed a different list publickey,keyboard-interactive,password\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /home/ansible/.ssh/id_rsa\r\ndebug3: send_pubkey_test\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,keyboard-interactive,password\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\nPermission denied (publickey,keyboard-interactive,password).", 
    "unreachable": true
}
 39129 1579178694.65208: no more pending results, returning what we have
 39129 1579178694.65225: results queue empty
 39129 1579178694.65230: checking for any_errors_fatal
 39129 1579178694.65236: done checking for any_errors_fatal
 39129 1579178694.65244: checking for max_fail_percentage
 39129 1579178694.65257: done checking for max_fail_percentage
 39129 1579178694.65262: checking to see if all hosts have failed and the running result is not ok
 39129 1579178694.65274: done checking to see if all hosts have failed
 39129 1579178694.65278: getting the remaining hosts for this loop
 39129 1579178694.65284: done getting the remaining hosts for this loop
 39129 1579178694.65297: building list of next tasks for hosts
 39129 1579178694.65302: done building task lists
 39129 1579178694.65307: counting tasks in each state of execution
 39129 1579178694.65312: done counting tasks in each state of execution:
num_setups: 0
num_tasks: 0
num_rescue: 0
num_always: 0
 39129 1579178694.65317: all hosts are done, so returning None's for all hosts
 39129 1579178694.65328: done queuing things up, now waiting for results queue to drain
 39129 1579178694.65333: results queue empty
 39129 1579178694.65343: checking for any_errors_fatal
 39129 1579178694.65352: done checking for any_errors_fatal
 39129 1579178694.65357: checking for max_fail_percentage
 39129 1579178694.65362: done checking for max_fail_percentage
 39129 1579178694.65366: checking to see if all hosts have failed and the running result is not ok
 39129 1579178694.65370: done checking to see if all hosts have failed
 39129 1579178694.65378: running handlers

PLAY RECAP ********************************************************************************************************************************
2020-01-16 14:44:54,654 p=ansible u=39129 | PLAY RECAP ********************************************************************************************************************************
R-TEST-SNIF                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   
2020-01-16 14:44:54,655 p=ansible u=39129 | R-TEST-SNIF                : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0   

 39129 1579178694.65543: RUNNING CLEANUP

[ansible@Netauto-Dev new_vlan]$


Thanks!

Yehuda Pinhas

unread,
Jan 20, 2020, 1:59:35 AM1/20/20
to Ansible Project
Hi again.
Anyone have any idea?

Yehuda Pinhas

unread,
Jan 20, 2020, 8:29:02 AM1/20/20
to Ansible Project
I think it has something to do with the publickey and that ansible tries to authenticate using the public key as primary method of authentication. 
For some reason it doesn't takes the username and password and just attempt SSH with it.

I think that because of the log file.

Phil Griffiths

unread,
Jan 20, 2020, 12:03:11 PM1/20/20
to Ansible Project
What happens when you setup your inventory to something like this:
[all:vars]
# these defaults can be overridden for any group in the [group:vars] section
ansible_connection=network_cli
ansible_user=ansible

[ios]
...

[ios:vars]
ansible_become=yes
ansible_become_method=enable
ansible_network_os=ios
ansible_user=ansible
ansible_password= ansible
Try setting those values in the inventory file and see what happens
Phil.

Yehuda Pinhas

unread,
Jan 21, 2020, 2:33:34 AM1/21/20
to Ansible Project
Hi Phil,
Thank you for your help.

Playbook:
  - name---------------   1. Applying Layer 2 Configuration   ---------------
    hostsSnif_TEST
    connectionnetwork_cli
    tasks:
    - include_vars:
        dir/etc/ansible/roles/new_vlan/vars/
    - include_role:
        namenew_vlan
        tasks_fromshow_vlan.yml

It's seems that after I set these variables under the inventory file like this:
all:
  children:
    POC_ENV:
      hosts:
        TEST-NXOS2:
        TEST-NXOS3:
    Snif_TEST:
      hosts:
        R-TEST-SNIF:
  vars:
    ansible_network_osios
    ansible_passwordansible
    ansible_becomeyes
    ansible_become_methodenable
    ansible_useransible

All other variables are equal to null except ansible_connection/ansible_network_os for some reason. Here is the output:
[ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml -vvvv
2020-01-21 09:25:53,934 p=ansible u=23836 | ansible-playbook 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  7 201900:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
2020-01-21 09:25:53,935 p=ansible u=23836 | Using /etc/ansible/ansible.cfg as config file
2020-01-21 09:25:53,936 p=ansible u=23836 | setting up inventory plugins
2020-01-21 09:25:53,947 p=ansible u=23836 | host_list declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-21 09:25:53,947 p=ansible u=23836 | script declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-21 09:25:53,953 p=ansible u=23836 | Parsed /etc/ansible/inventory/POC_ENV.yml inventory source with yaml plugin
2020-01-21 09:25:53,954 p=ansible u=23836 | setting up inventory plugins
2020-01-21 09:25:55,045 p=ansible u=23836 | Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
2020-01-21 09:25:55,138 p=ansible u=23836 | PLAYBOOK: new_vlan_playbook.yml ***********************************************************************************************************
2020-01-21 09:25:55,139 p=ansible u=23836 | 1 plays in new_vlan_playbook.yml
2020-01-21 09:25:55,145 p=ansible u=23836 | PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************
2020-01-21 09:25:55,159 p=ansible u=23836 | TASK [Gathering Facts] ********************************************************************************************************************
2020-01-21 09:25:55,202 p=ansible u=23847 | <R-TEST-SNIF> attempting to start connection
2020-01-21 09:25:55,203 p=ansible u=23847 | <R-TEST-SNIF> using connection plugin network_cli
2020-01-21 09:25:55,843 p=ansible u=23847 | <R-TEST-SNIF> local domain socket does not exist, starting it
2020-01-21 09:25:55,843 p=ansible u=23847 | <R-TEST-SNIF> control socket path is /home/ansible/.ansible/pc/e8627bbe23
2020-01-21 09:25:55,844 p=ansible u=23847 | <R-TEST-SNIF> local domain socket listeners started successfully
2020-01-21 09:25:55,844 p=ansible u=23847 | <R-TEST-SNIF> loaded cliconf plugin ios from path /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py for network_os ios
2020-01-21 09:25:55,844 p=ansible u=23847 | network_os is set to ios
2020-01-21 09:25:55,845 p=ansible u=23847 | <R-TEST-SNIF> 
2020-01-21 09:25:55,845 p=ansible u=23847 | <R-TEST-SNIF> local domain socket path is /home/ansible/.ansible/pc/e8627bbe23
2020-01-21 09:25:55,853 p=ansible u=23847 | [WARNING]: Ignoring timeout(10) for ios_facts

2020-01-21 09:25:55,854 p=ansible u=23847 | <R-TEST-SNIF> ESTABLISH LOCAL CONNECTION FOR USER: ansible
2020-01-21 09:25:55,855 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053 `" && echo ansible-tmp-1579591555.85-45205629859053="` echo /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053 `" ) && sleep 0'
2020-01-21 09:25:56,725 p=ansible u=23847 | <R-TEST-SNIF> Attempting python interpreter discovery
2020-01-21 09:25:56,726 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
2020-01-21 09:25:56,748 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
2020-01-21 09:25:56,822 p=ansible u=23847 | Using module file /usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_facts.py
2020-01-21 09:25:56,824 p=ansible u=23847 | <R-TEST-SNIF> PUT /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/tmpGPq3T6 TO /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053/AnsiballZ_ios_facts.py
2020-01-21 09:25:56,827 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053/ /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053/AnsiballZ_ios_facts.py && sleep 0'
2020-01-21 09:25:56,846 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053/AnsiballZ_ios_facts.py && sleep 0'
2020-01-21 09:25:57,241 p=ansible u=23855 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 09:26:01,684 p=ansible u=23855 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 09:26:01,975 p=ansible u=23790 | persistent connection idle timeout triggered, timeout value is 30 secs.
See the timeout setting options in the Network Debug and Troubleshooting Guide.
2020-01-21 09:26:02,078 p=ansible u=23790 | shutdown complete
2020-01-21 09:26:08,083 p=ansible u=23855 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 09:26:18,509 p=ansible u=23855 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 09:26:20,917 p=ansible u=23855 | Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible/utils/jsonrpc.py", line 45, in handle_request
    result = rpc_method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py", line 252, in get_capabilities
    result = super(Cliconf, self).get_capabilities()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.py", line 283, in get_capabilities
    result['device_info'] = self.get_device_info()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py", line 203, in get_device_info
    reply = self.get(command='show version')
  File "/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py", line 197, in get
    return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.py", line 127, in send_command
    resp = self._connection.send(**kwargs)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/__init__.py", line 34, in wrapped
    self._connect()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 426, in _connect
    raise AnsibleConnectionFailure(to_text(e, errors='surrogate_or_strict'))
AnsibleConnectionFailure: No existing session

2020-01-21 09:26:20,952 p=ansible u=23847 | <R-TEST-SNIF> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-local-23836IRvmI3/ansible-tmp-1579591555.85-45205629859053/ > /dev/null 2>&1 && sleep 0'
2020-01-21 09:26:20,992 p=ansible u=23836 | fatal: [R-TEST-SNIF]: FAILED! => {
    "ansible_facts": {}, 
    "changed"false
    "failed_modules": {
        "ios_facts": {
            "ansible_facts": {
                "discovered_interpreter_python""/usr/bin/python"
            }, 
            "exception""WARNING: The below traceback may *not* be related to the actual failure.\n  File \"/tmp/ansible_ios_facts_payload_s6ScBp/ansible_ios_facts_payload.zip/ansible/module_utils/network/common/network.py\", line 229, in get_capabilities\n    capabilities = Connection(module._socket_path).get_capabilities()\n  File \"/tmp/ansible_ios_facts_payload_s6ScBp/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\n    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)\n"
            "failed"true
            "invocation": {
                "module_args": {
                    "auth_pass"null
                    "authorize"null
                    "gather_network_resources"null
                    "gather_subset": [
                        "all"
                    ], 
                    "host"null
                    "password"null
                    "port"null
                    "provider"null
                    "ssh_keyfile"null
                    "timeout"null
                    "username"null
                }
            }, 
            "msg""No existing session"
        }
    }, 
    "msg""The following modules failed to execute: ios_facts\n"
}
2020-01-21 09:26:20,996 p=ansible u=23836 | PLAY RECAP ********************************************************************************************************************************
2020-01-21 09:26:20,997 p=ansible u=23836 | R-TEST-SNIF                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

The only way I have managed to make ansible to work is with connection: local + ssh keys (pubkey installed on client).
Why is it failing??



Yehuda Pinhas

unread,
Jan 21, 2020, 3:30:38 AM1/21/20
to Ansible Project
Hi!
I have found out that some IOS devices have problems with gather_facts and ansible does that by default. So I disabled it with gather_facts=no and now ansible continues to the next step now without gathering facts and skips the ios_facts error.

Also I have changed some paramiko config on the ansible.cfg  like this:
[paramiko_connection]

# uncomment this line to cause the paramiko connection plugin to not record new host
# keys encountered.  Increases performance on new host additions.  Setting works independently of the
# host key checking setting above.
#record_host_keys=False

# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this
# line to disable this behaviour.
#pty=False

# paramiko will default to looking for SSH keys initially when trying to
# authenticate to remote devices.  This is a problem for some network devices
# that close the connection after a key failure.  Uncomment this line to
# disable the Paramiko look for keys function
look_for_keys = False

# When using persistent connections with Paramiko, the connection runs in a
# background process.  If the host doesn't already have a valid SSH key, by
# default Ansible will prompt to add the host key.  This will cause connections
# running in background processes to fail.  Uncomment this line to have
# Paramiko automatically add host keys.
host_key_auto_add = True
Note that these changes didn't made any difference.. So if its commented or not i get the same error - No Existing Session

This is my code now:
---
  - name---------------   1. Applying Layer 2 Configuration   ---------------
    hostsSnif_TEST
    gather_factsno
    vars:
      ansible_becomeyes
      ansible_become_methodenable
      ansible_useransible
      ansible_passwordansible
      ansible_network_osios
      ansible_connectionnetwork_cli
    tasks:
    - include_vars:
        dir/etc/ansible/roles/new_vlan/vars/
    - include_role:
        namenew_vlan
        tasks_fromshow_vlan.yml
I have found out that it doesn't matter if I put the vars under all:vars or just vars on the playbook it produces the same results.

So after bypassing the gathering_facts error my current error is:
2020-01-21 10:26:27,529 p=ansible u=26571 | ansible-playbook 2.9.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  7 201900:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
2020-01-21 10:26:27,530 p=ansible u=26571 | Using /etc/ansible/ansible.cfg as config file
2020-01-21 10:26:27,531 p=ansible u=26571 | setting up inventory plugins
2020-01-21 10:26:27,543 p=ansible u=26571 | host_list declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-21 10:26:27,543 p=ansible u=26571 | script declined parsing /etc/ansible/inventory/POC_ENV.yml as it did not pass its verify_file() method
2020-01-21 10:26:27,548 p=ansible u=26571 | Parsed /etc/ansible/inventory/POC_ENV.yml inventory source with yaml plugin
2020-01-21 10:26:27,548 p=ansible u=26571 | setting up inventory plugins
2020-01-21 10:26:28,353 p=ansible u=26571 | Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
2020-01-21 10:26:28,452 p=ansible u=26571 | PLAYBOOK: new_vlan_playbook.yml ***********************************************************************************************************
2020-01-21 10:26:28,453 p=ansible u=26571 | 1 plays in new_vlan_playbook.yml
2020-01-21 10:26:28,468 p=ansible u=26571 | PLAY [---------------   1. Applying Layer 2 Configuration   ---------------] **************************************************************
2020-01-21 10:26:28,476 p=ansible u=26571 | META: ran handlers
2020-01-21 10:26:28,484 p=ansible u=26571 | TASK [include_vars] ***********************************************************************************************************************
2020-01-21 10:26:28,518 p=ansible u=26580 | <R-TEST-SNIF> attempting to start connection
2020-01-21 10:26:28,518 p=ansible u=26580 | <R-TEST-SNIF> using connection plugin network_cli
2020-01-21 10:26:29,116 p=ansible u=26580 | <R-TEST-SNIF> local domain socket does not exist, starting it
2020-01-21 10:26:29,116 p=ansible u=26580 | <R-TEST-SNIF> control socket path is /home/ansible/.ansible/pc/b2fb8201f6
2020-01-21 10:26:29,117 p=ansible u=26580 | <R-TEST-SNIF> local domain socket listeners started successfully
2020-01-21 10:26:29,117 p=ansible u=26580 | <R-TEST-SNIF> loaded cliconf plugin ios from path /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.py for network_os ios
2020-01-21 10:26:29,117 p=ansible u=26580 | network_os is set to ios
2020-01-21 10:26:29,117 p=ansible u=26580 | <R-TEST-SNIF> 
2020-01-21 10:26:29,118 p=ansible u=26580 | <R-TEST-SNIF> local domain socket path is /home/ansible/.ansible/pc/b2fb8201f6
2020-01-21 10:26:29,129 p=ansible u=26571 | ok: [R-TEST-SNIF] => {
    "ansible_facts": {
        "CONFIG_STATE""absent"
        "IP_ADDRESS""{{ network_subnet ~ HOST_IP.stdout[0] }}"
        "ansible_ssh_private_key_file""/home/ansible/.ssh/id_rsa"
        "network_subnet""10.3.84."
        "vlan_id"384
        "vlan_name""TEST_VLAN_TEST"
    }, 
    "ansible_included_var_files": [
        "/etc/ansible/roles/new_vlan/vars/new_vlan_vars.yml"
    ], 
    "changed"false
}
2020-01-21 10:26:29,138 p=ansible u=26571 | TASK [include_role : new_vlan] ************************************************************************************************************
2020-01-21 10:26:29,518 p=ansible u=26571 | TASK [new_vlan : ---------------   1. Show VLAN   ----------------------] *****************************************************************
2020-01-21 10:26:29,549 p=ansible u=26592 | <R-TEST-SNIF> attempting to start connection
2020-01-21 10:26:29,550 p=ansible u=26592 | <R-TEST-SNIF> using connection plugin network_cli
2020-01-21 10:26:30,068 p=ansible u=26592 | <R-TEST-SNIF> found existing local domain socket, using it!
2020-01-21 10:26:30,069 p=ansible u=26592 | <R-TEST-SNIF> updating play_context for connection
2020-01-21 10:26:30,069 p=ansible u=26592 | <R-TEST-SNIF> 
2020-01-21 10:26:30,069 p=ansible u=26592 | <R-TEST-SNIF> local domain socket path is /home/ansible/.ansible/pc/b2fb8201f6
2020-01-21 10:26:30,085 p=ansible u=26588 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 10:26:34,515 p=ansible u=26588 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 10:26:40,946 p=ansible u=26588 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 10:26:51,375 p=ansible u=26588 | <R-TEST-SNIF> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: ansible on PORT 22 TO R-TEST-SNIF
2020-01-21 10:26:53,772 p=ansible u=26588 | Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ansible/utils/jsonrpc.py", line 45, in handle_request
    result = rpc_method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/__init__.py", line 34, in wrapped
    self._connect()
  File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/network_cli.py", line 426, in _connect
    raise AnsibleConnectionFailure(to_text(e, errors='surrogate_or_strict'))
AnsibleConnectionFailure: No existing session

2020-01-21 10:26:53,785 p=ansible u=26571 | fatal: [R-TEST-SNIF]: FAILED! => {
    "changed"false
    "msg""No existing session"
}
2020-01-21 10:26:53,788 p=ansible u=26571 | PLAY RECAP ********************************************************************************************************************************
2020-01-21 10:26:53,789 p=ansible u=26571 | R-TEST-SNIF                : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   



Any ideas?? im lost here its still not working!

Phil Griffiths

unread,
Jan 21, 2020, 5:27:53 AM1/21/20
to Ansible Project
Have you tried setting remote_user? see https://docs.ansible.com/ansible/latest/plugins/connection/network_cli.html for details
Also does the Cisco IOS device actually allow password authentication with SSH? You can check with something like: 
enable
conf term
ip ssh server authenticate user password

and show ip ssh should show password authentication as listed

From what I can see you didn't use a straight inventory file like I suggested trying but just added the vars to another file?
Checkout the hosts example file here: https://github.com/ansible/workshops/tree/master/exercises/ansible_network/1-explore and setup something like this

Then just try ansible R-TEST-SNIF -m ping and see if that works first

Yehuda Pinhas

unread,
Jan 21, 2020, 5:56:11 AM1/21/20
to Ansible Project
1. Yes. remote_user is already set on ansible.cfg file:
# SSH timeout
#timeout = 10

# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
remote_user = ansible

# logging is off by default unless this path is defined
# if so defined, consider logrotate
log_path = /etc/ansible/ansiout.log

2. ip ssh server authenticate user password is enabled on the remote device. Here is the output:

Capture.PNG


3. I have already tested the vars on the inventory file like you suggested and instead I also tried to define the vars on the playbook itself (all info is in the last 2 messages I posted here)
    The result was the same for either situation - No existing Session.
    Anyway since u still think it matters, I have now moved the vars definition to [all:vars] so consider it done.

4. ansible ping works. 


Here are both results of :
 - current status with your suggestions about the vars on inventory, remote_user, show ip ssh
 - ping result

Capture.PNG


If ping works it means that the code is ok and its something with authentication but i'm not sure what... everything seems good but still not working..
Message has been deleted

Phil Griffiths

unread,
Jan 21, 2020, 10:34:41 AM1/21/20
to ansible...@googlegroups.com
I’ve tried a few connections:

It seems that ansible_user is not honoured with the network_cli plugin so make sure you’re not using that still:

$ ansible cisco -m ios_command -a "commands='sh ip int br'" -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e 'ansible_user=ansible' -k
SSH password:
rtr1 | FAILED! => {
    "changed": false,
    "msg": "Failed to authenticate: Authentication failed."
}

Both remote_user and -u username work for me:

$ ansible cisco -m ios_command -a "commands='sh ip int br'" -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -u ansible -k
SSH password:
rtr1 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "stdout": [
        "Interface              IP-Address      OK? Method Status                Protocol\nGigabitEthernet1       172.16.253.234  YES DHCP   up                    up      \nLoopback0              192.168.1.1     YES manual up                    up      \nTunnel0                10.100.100.1    YES manual up                    up      \nTunnel1                10.200.200.1    YES manual up                    up      \nVirtualPortGroup0      192.168.35.101  YES TFTP   up                    up"
    ],
    "stdout_lines": [
        [
            "Interface              IP-Address      OK? Method Status                Protocol",
            "GigabitEthernet1       172.16.253.234  YES DHCP   up                    up      ",
            "Loopback0              192.168.1.1     YES manual up                    up      ",
            "Tunnel0                10.100.100.1    YES manual up                    up      ",
            "Tunnel1                10.200.200.1    YES manual up                    up      ",
            "VirtualPortGroup0      192.168.35.101  YES TFTP   up                    up"
        ]
    ]
}


$ ansible cisco -m ios_command -a "commands='sh ip int br'" -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e 'remote_user=ansible' -k
SSH password:
[WARNING]: Found variable using reserved name: remote_user

rtr1 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "stdout": [
        "Interface              IP-Address      OK? Method Status                Protocol\nGigabitEthernet1       172.16.253.234  YES DHCP   up                    up      \nLoopback0              192.168.1.1     YES manual up                    up      \nTunnel0                10.100.100.1    YES manual up                    up      \nTunnel1                10.200.200.1    YES manual up                    up      \nVirtualPortGroup0      192.168.35.101  YES TFTP   up                    up"
    ],
    "stdout_lines": [
        [
            "Interface              IP-Address      OK? Method Status                Protocol",
            "GigabitEthernet1       172.16.253.234  YES DHCP   up                    up      ",
            "Loopback0              192.168.1.1     YES manual up                    up      ",
            "Tunnel0                10.100.100.1    YES manual up                    up      ",
            "Tunnel1                10.200.200.1    YES manual up                    up      ",
            "VirtualPortGroup0      192.168.35.101  YES TFTP   up                    up"
        ]
    ]
}

Note that I had to remove/disable the valid SSH keys in the router, as the first auth method is publckey. Until I did this I could still connect.






On 21 Jan 2020, at 13:53, Yehuda Pinhas <yuda....@gmail.com> wrote:

Hi!

To simplify stuff I am troubleshooting this problem with the command below:
ansible -m ios_command -e commands='sh ip int br' -i /etc/ansible/inventory/ R-TEST-SNIF -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -u ansible -k
It will make it easier to troubleshoot this problem without messing around with multiple files and folders.

  - It runs the ios_command module on the host R-TEST-SNIF that is located on the inventory folder. -e is extra_vars and those are ansible_connection & ansible_network_os.
-u for username = ansible, -k for prompting SSH Password.

Result is the same - No Existing Sessions.
Below im attaching proof that ping works and SSH by cli is working to the remote router and the ansible does not.

<Capture.PNG>




Suggestions?

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/VeJcHLrMyQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9320b24b-6542-4de2-9077-561a4092b33d%40googlegroups.com.
<Capture.PNG>

Yehuda Pinhas

unread,
Jan 22, 2020, 3:11:39 AM1/22/20
to Ansible Project
[ansible@Netauto-Dev new_vlan]$ ansible -m ios_command -e commands='sh ip int br' -i /etc/ansible/inventory/ R-TEST-SNIF -e 'ansible_connection=network_cli' -e 'ansible_network_os=ios' -e 'remote_user=ansible' -k
SSH password: 
[WARNING]: Found variable using reserved name: remote_user

R-TEST-SNIF | FAILED! => {
    "changed": false, 
    "msg": "No existing session"


This is my result..

I think I dont understand a couple of things:
1. Why do you have to remove the SSH keys from the router? should'nt it use the SSH keys as primary method and then fallback to using password?
2. What exactly did you do on the cisco device to remove the keys? (although I dont beleive it is a solution for me since I cant remove SSH keys on devices in my real network)
3. There isn't a way to do password authentication without removing SSH keys?

Phil Griffiths

unread,
Jan 22, 2020, 4:08:51 AM1/22/20
to ansible...@googlegroups.com
I only removed the SSH key to remove pub key authentication from the router. As it’s the first authentication protocol used, the ansible command was ignoring the passed in username/password.
It was for testing only. Your router config does pub key -> kbd interactive -> password authentication out the box. If you’ve got a working ssh key then it won’t get to password auth.

I think you’re hitting the bug I mentioned. I did some testing yesterday with pip installs around paramiko and it broke with later versions. 

Check your version : pip list | grep paramiko
Try pinning it to 2.0.2 - pip install paramiko==2.0.2 (you might need to use sudo with this depending on where you’ve installed, if you’re not root)



--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/VeJcHLrMyQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

Yehuda Pinhas

unread,
Jan 22, 2020, 11:10:58 AM1/22/20
to Ansible Project
Yea you are right. I am hitting this bug and I can't see myself pulling this off.

I'll just go with the pubkey method although I wanted to avoid it because I have lots of network devices. But no choice here because Ansible is not going to work without SSH keys on these IOS versions.

FYI,
This code is working perfectly on NXOS switches I've got without touching the SSH keys. Also, I read that this bug hits only IOS version 15.7 and below and does not apply on NXOS/IOS-XE/IOS 15.8 or higher.



Thank you Phil and Vladimir for your help. I'll just go for Public Key authentication.
Peace out  <3
Reply all
Reply to author
Forward
0 new messages