Giter Club home page Giter Club logo

ansible.netcommon's Introduction

Ansible Network Collection for Common Code (netcommon)

CI Codecov CI

The Ansible ansible.netcommon collection includes common content to help automate the management of network, security, and cloud devices. This includes connection plugins, such as network_cli, httpapi, and netconf.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.15.0.

For collections that support Ansible 2.9, please ensure you update your network_os to use the fully qualified collection name (for example, cisco.ios.ios). Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.

Included content

Become plugins

Name Description
ansible.netcommon.enable Switch to elevated permissions on a network device

Cliconf plugins

Name Description
ansible.netcommon.default General purpose cliconf plugin for new platforms

Connection plugins

Name Description
ansible.netcommon.grpc Provides a persistent connection using the gRPC protocol
ansible.netcommon.httpapi Use httpapi to run command on network appliances
ansible.netcommon.libssh Run tasks using libssh for ssh connection
ansible.netcommon.netconf Provides a persistent connection using the netconf protocol
ansible.netcommon.network_cli Use network_cli to run command on network appliances
ansible.netcommon.persistent Use a persistent unix socket for connection

Filter plugins

Name Description
ansible.netcommon.comp_type5 The comp_type5 filter plugin.
ansible.netcommon.hash_salt The hash_salt filter plugin.
ansible.netcommon.parse_cli parse_cli filter plugin.
ansible.netcommon.parse_cli_textfsm parse_cli_textfsm filter plugin.
ansible.netcommon.parse_xml The parse_xml filter plugin.
ansible.netcommon.pop_ace Remove ace entries from a acl source of truth.
ansible.netcommon.type5_pw The type5_pw filter plugin.
ansible.netcommon.vlan_expander The vlan_expander filter plugin.
ansible.netcommon.vlan_parser The vlan_parser filter plugin.

Httpapi plugins

Name Description
ansible.netcommon.restconf HttpApi Plugin for devices supporting Restconf API

Netconf plugins

Name Description
ansible.netcommon.default Use default netconf plugin to run standard netconf commands as per RFC

Modules

Name Description
ansible.netcommon.cli_backup Back up device configuration from network devices over network_cli
ansible.netcommon.cli_command Run a cli command on cli-based network devices
ansible.netcommon.cli_config Push text based configuration to network devices over network_cli
ansible.netcommon.cli_restore Restore device configuration to network devices over network_cli
ansible.netcommon.grpc_config Fetch configuration/state data from gRPC enabled target hosts.
ansible.netcommon.grpc_get Fetch configuration/state data from gRPC enabled target hosts.
ansible.netcommon.net_get Copy a file from a network device to Ansible Controller
ansible.netcommon.net_ping Tests reachability using ping from a network device
ansible.netcommon.net_put Copy a file from Ansible Controller to a network device
ansible.netcommon.netconf_config netconf device configuration
ansible.netcommon.netconf_get Fetch configuration/state data from NETCONF enabled network devices.
ansible.netcommon.netconf_rpc Execute operations on NETCONF enabled network devices.
ansible.netcommon.network_resource Manage resource modules
ansible.netcommon.restconf_config Handles create, update, read and delete of configuration data on RESTCONF enabled devices.
ansible.netcommon.restconf_get Fetch configuration/state data from RESTCONF enabled devices.
ansible.netcommon.telnet Executes a low-down and dirty telnet command

Installing this collection

You can install the ansible.netcommon collection with the Ansible Galaxy CLI:

ansible-galaxy collection install ansible.netcommon

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: ansible.netcommon

Using this collection

The most common use case for this collection is to include it as a dependency in a network device-specific collection. Use the Fully Qualified Collection Name (FQCN) when referring to content in this collection (for example, ansible.netcommon.network_cli).

See the Vyos collection for an example of this.

See Also:

Contributing to this collection

We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the ansible.netcommon collection repository. See Contributing to Ansible-maintained collections for complete details.

You can also join us on:

See the Ansible Community Guide for details on contributing to Ansible.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release notes

Release notes are available here

Roadmap

More information

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

ansible.netcommon's People

Contributors

abadger avatar akira6592 avatar andersson007 avatar ansible-zuul[bot] avatar ashwini-mhatre avatar capttrews avatar cidrblock avatar felixfontein avatar ganeshrn avatar gomathiselvis avatar javeedf avatar jk464 avatar justjais avatar kb-perbyte avatar michaelpsomiadis avatar mrflatt avatar nilashishc avatar p-rintz avatar pabelanger avatar pre-commit-ci[bot] avatar pszulczewski avatar qalthos avatar rohitthakur2590 avatar ruchip16 avatar samccann avatar sfuhrm avatar softwarefactory-project-zuul[bot] avatar sstoner avatar tnizharadze avatar vincentbernat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible.netcommon's Issues

terminal_stderr_re may not raise an error when there is several chunks of data.

SUMMARY

terminal_stderr_re may not raise an error when there is several chunks of data.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Custom modules based on network_cli / cliconf.

ANSIBLE VERSION
ansible 2.8.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/mnt/nas/local_dev/ansible/roles', u'/home/user/.ansible/roles', u'/home/user/.ansible/plugins']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

But even reproducible in Ansible 2.9

CONFIGURATION
ANSIBLE_FORCE_COLOR(/etc/ansible/ansible.cfg) = True
DEFAULT_ACTION_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/generic.modules/action_plugins']
DEFAULT_CLICONF_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/cliconf_plugins', u'/mnt/nas/local_dev/ansible/roles/ios/cliconf_plugins', u'/mnt/nas/local_dev/ansible/roles/junos/cliconf_plugins', u'/mnt/nas/local_dev/an
DEFAULT_CONNECTION_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/connection_plugins', u'/mnt/nas/local_dev/ansible/roles/ios/connection_plugins', u'/mnt/nas/local_dev/ansible/roles/junos/connection_plugins', u'/mnt/na
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = [u'/etc/ansible/hosts']
DEFAULT_HTTPAPI_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/httpapi_plugins', u'/mnt/nas/local_dev/ansible/roles/ios/httpapi_plugins', u'/mnt/nas/local_dev/ansible/roles/junos/httpapi_plugins', u'/mnt/nas/local_dev/an
DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles', u'/home/user/.ansible/roles', u'/home/user/.ansible/plugins']
DEFAULT_MODULE_UTILS_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/module_utils', u'/mnt/nas/local_dev/ansible/roles/ios/module_utils', u'/mnt/nas/local_dev/ansible/roles/junos/module_utils', u'/mnt/nas/local_dev/ansible/roles
DEFAULT_NETCONF_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/netconf_plugins', u'/mnt/nas/local_dev/ansible/roles/ios/netconf_plugins', u'/mnt/nas/local_dev/ansible/roles/junos/netconf_plugins', u'/mnt/nas/local_dev/an
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/share/ansible/roles', u'/mnt/nas/local_dev/ansible/roles']
DEFAULT_TERMINAL_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/mnt/nas/local_dev/ansible/roles/dellos/terminal_plugins', u'/mnt/nas/local_dev/ansible/roles/ios/terminal_plugins', u'/mnt/nas/local_dev/ansible/roles/junos/terminal_plugins', u'/mnt/nas/dev_ei
DEPRECATION_WARNINGS(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT

All devices may be impacted.

STEPS TO REPRODUCE

We can't share the entire custom modules we use, but in a nutshell.

Terminal plugins

    terminal_stdout_re = [re.compile(br"MyPrompt >")]
    terminal_stderr_re = [re.compile(br"Command unknown")]

After sending a command, suppose we received these chunks of data :

1st chunk : ["Command unknown", "Lorem", "ipsum"]
2st chunk : ["Lorem2", "MyPrompt >"]

In this case no error is raise, because between the 2 chunk, the variable : is_error_message is set to False

Code explanation :

In network_cli.py

def receive([...])
    [...]
    if self._find_prompt(window):  # window = chunk of data

          # expected True; else still wait chunk of data

def _find_prompt(self, response):
    '''Searches the buffered response for a matching command prompt
    '''
    errored_response = None
    is_error_message = False

    for regex in self._terminal_stderr_re:  # First chunk - match  / Second chunk - no match
        if regex.search(response):
            is_error_message = True

            # Check if error response ends with command prompt if not
            # receive it buffered prompt
            for regex in self._terminal_stdout_re:  # First chunk - no match - so errored_response is not set
                match = regex.search(response)
                if match:
                    errored_response = response
                    self._matched_pattern = regex.pattern
                    self._matched_prompt = match.group()
                    self._log_messages("matched error regex '%s' from response '%s'" % (self._matched_pattern, errored_response))
                    break

    if not is_error_message: # Second chunk, is_error_message was reset to False, so the condition are True.
        for regex in self._terminal_stdout_re:
            match = regex.search(response)
            if match:
                self._matched_pattern = regex.pattern
                self._matched_prompt = match.group()
                self._log_messages("matched cli prompt '%s' with regex '%s' from response '%s'" % (self._matched_prompt, self._matched_pattern, response))
                if not errored_response: 
                    return True  # Finally return "Everything is okkayyy"

    if errored_response: # First chunk - errored_response is still None -> not triggered - no error raise
        raise AnsibleConnectionFailure(errored_response)

    return False

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ansible-devel/Dh-BshpEIFI/iSjhPXB9AAAJ

EXPECTED RESULTS

Raise an error after catch the "terminal_stderr_re"

ACTUAL RESULTS

No error raised.

remove annoying message from netconf

Can we only show this when the user is running verbose?

TASK [Build a yang path based on the OS and version] *********************************
unable to load netconf plugin for network_os arista.eos.eos, falling back to default plugin
ok: [eos102]

It suggests something might be wrong, when in reality both eos and nxos work fine with the default plugin.

Error parsing Cisco IOS interface configuration with parse_cli using "start_block"&"end_block"

SUMMARY

Error parsing Cisco IOS interface configuration with parse_cli when using "start_block" and "end_block" parameters.
Here is a small patch, that fixes this bug.
network.py.patch.txt

ISSUE TYPE
  • Bug Report
COMPONENT NAME

parse_cli

ANSIBLE VERSION
root@ansible:~/ansible# ansible --version
ansible 2.9.7
  config file = /root/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0]
CONFIGURATION
root@ansible:~/ansible# ansible-config dump --only-changed
DEFAULT_GATHERING(/root/ansible/ansible.cfg) = explicit
DEFAULT_HOST_LIST(/root/ansible/ansible.cfg) = [u'/root/ansible/inventories']
DEFAULT_LOG_PATH(/root/ansible/ansible.cfg) = /root/ansible/log/ansible.log
DISPLAY_ARGS_TO_STDOUT(/root/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/root/ansible/ansible.cfg) = auto
PARAMIKO_HOST_KEY_AUTO_ADD(/root/ansible/ansible.cfg) = True
OS / ENVIRONMENT
STEPS TO REPRODUCE
root@ansible:~/ansible# cat test.yml
---
- name: Test
  hosts: s-terra
  gather_facts: no
  vars:
    test_var: |
      interface GigabitEthernet1
       ip address 10.10.10.1 255.255.255.0
      !
      interface GigabitEthernet1.10
       encapsulation dot1Q 10
       ip address 10.10.20.1 255.255.255.0
      !
      !
      ip forward-protocol nd
      ip http server
      ip http authentication local
      ip http secure-server
      !
      !
  tasks:
    - name: Debug
      vars:
        second_var: "{{ test_var | parse_cli('parse_templates/ios_test.yml') }}"
      debug: var=second_var

root@ansible:~/ansible# cat parse_templates/ios_test.yml
---
vars:
  ios_iface:
    name: "{{ item[0].name }}"
    ip: "{{ item[1].ip }}"

keys:
  ios_ifaces:
    value: "{{ ios_iface }}"
    start_block: "^interface .*$"
    end_block: "^!$"
    items:
      - "^interface (?P<name>.+)\\n"
      - "\\sip address (?P<ip>.+)\\n"
EXPECTED RESULTS
root@ansible:~/ansible# ansible-playbook test.yml

PLAY [Test] *******************************************************************************************************

TASK [Debug var=second_var] ***************************************************************************************
ok: [s-terra] => {
    "second_var": [
        {
            "ip": "10.10.10.1 255.255.255.0",
            "name": "GigabitEthernet1"
        },
        {
            "ip": "10.10.20.1 255.255.255.0",
            "name": "GigabitEthernet1.10"
        }
    ]
}

PLAY RECAP ********************************************************************************************************
s-terra                    : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 
ACTUAL RESULTS
root@ansible:~/ansible# ansible-playbook test.yml

PLAY [Test] *******************************************************************************************************

TASK [Debug var=second_var] ***************************************************************************************
ok: [s-terra] => {
    "second_var": [
        {
            "ip": "10.10.10.1 255.255.255.0",
            "name": "GigabitEthernet1"
        },
        {
            "ip": "10.10.20.1 255.255.255.0",
            "name": "GigabitEthernet1.10"
        },
        {
            "ip": "10.10.20.1 255.255.255.0",
            "name": "GigabitEthernet1.10"
        },
        {
            "ip": "10.10.20.1 255.255.255.0",
            "name": "GigabitEthernet1.10"
        },
        {
            "ip": "10.10.20.1 255.255.255.0",
            "name": "GigabitEthernet1.10"
        }
    ]
}

PLAY RECAP ********************************************************************************************************
s-terra                    : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 

telnet module string concationation TypeError

SUMMARY

telnet.py fails to execute if username or password are numeric AND not quoted in either vault, variables or module parameters inside playbook. Even if you quote variables in module parameters inside of playbook. it looks like there should be type conversion to strings (as Python does when you put numbers in quotes) but it does not happening for some reason.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

lib/ansible/modules/commands/telnet.py

ANSIBLE VERSION
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/geexmmo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0]
CONFIGURATION
OS / ENVIRONMENT

Fresh Archlinux

STEPS TO REPRODUCE
ansible-playbook playbook.yml -i inventory/hosts.yml --ask-vault-pass -vvv
playbook.yml
---
- hosts: office
  vars:
    switch_user: admin
    switch_password: 123
 # password is numeric in this example
  order: inventory
  gather_facts: false
  connection: local
  # vars_files:
  #   - ./vars/vars.yml
  # vars.yml could be used but there is vars: it this example. vars.yml could be vault encrypted too
  tasks:
  - name: Test connection
    telnet:
      host: "{{ inventory_hostname }}"
      user: "{{ switch_user }}"
      password: "{{ switch_password }}"
      login_prompt: "User name: "
      password_prompt: "Password: "
      prompts:
        - "#"
      command:
        - show ip
...
vars/vars.yml
switch_user: admin
switch_password: 123
EXPECTED RESULTS

As vars are quoted in module parameters - there should be no problem with python concatenating it as strings and telnet module should be executed.

ACTUAL RESULTS

Play fails with python error because it receives INT and not STRing

PLAYBOOK: get-macs.yml ************************************************************************************************************************************************
1 plays in get-macs.yml

PLAY [office] *********************************************************************************************************************************************************
META: ran handlers

TASK [Test connection] ************************************************************************************************************************************************
task path: /home/geexmmo/yess/switches-automation/get-macs.yml:12
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 146, in run
    res = self._execute()
  File "/usr/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 645, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/lib/python3.8/site-packages/ansible/plugins/action/telnet.py", line 71, in run
    tn.write(to_bytes(password + "\n"))
TypeError: unsupported operand type(s) for +: 'int' and 'str'
fatal: [10.1.2.43]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

PLAY RECAP ************************************************************************************************************************************************************
10.1.2.43                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

404 HTTP Errors lead to Command Timeout

SUMMARY

Using HTTPAPI plugin in one of our modules if 404 response is received the module seems to hang until command timeout is reached.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Httpapi

ANSIBLE VERSION
ansible 2.9.11
  config file = /Users/**redacted**/devsettings/ansible.cfg
  configured module search path = ['/Users/**redacted**/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/**redacted**/environments/f5-ansible/lib/python3.8/site-packages/ansible
  executable location = /Users/**redacted**/environments/f5-ansible/bin/ansible
  python version = 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [Clang 6.0 (clang-600.0.57)]

CONFIGURATION
COLLECTIONS_PATHS(/Users/**redacted**/devsettings/ansible.cfg) = ['/Users/**redacted**/Work/f5_bigip']
DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /tmp/ansible.log
DEFAULT_ROLES_PATH(/Users/**redacted**/devsettings/ansible.cfg) = ['/Users/**redacted**/Work/f5_bigip/integration/targets']
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/**redacted**/.vault
DEPRECATION_WARNINGS(/Users/**redacted**/devsettings/ansible.cfg) = False
HOST_KEY_CHECKING(/Users/**redacted**/devsettings/ansible.cfg) = False
INVENTORY_ENABLED(/Users/**redacted**/devsettings/ansible.cfg) = ['ini']
NETWORK_GROUP_MODULES(/Users/**redacted**/devsettings/ansible.cfg) = ['bigip', 'bigiq']
RETRY_FILES_ENABLED(/Users/**redacted**/devsettings/ansible.cfg) = False

OS / ENVIRONMENT
System Version: macOS 10.13.6 (17G13035)
Kernel Version: Darwin 17.7.0

ansible.netcommon: "version": "1.0.1-dev18"
Also tested with ansible.netcommon: 1.0

STEPS TO REPRODUCE

This is a new module in development, so i guess the easiest to reproduce it is to make a basic module to do an HTTP call that will result in 404 error.

HTTPAPI plugin code:
https://gist.github.com/wojtek0806/fb13aa85f799c0eec8cf13b83bd06fa5

EXPECTED RESULTS

Expected the module proceed

ACTUAL RESULTS

Ansible log file attached:
https://gist.github.com/wojtek0806/f1d5f50ecee1a57e5cd13521e749695e

Inclusion of ansible.netcommon in Ansible 2.10

This collection will be included in Ansible 2.10 because it contains modules and/or plugins that were included in Ansible 2.9. Please review:

DEADLINE: 2020-08-18

The latest version of the collection available on August 18 will be included in Ansible 2.10.0, except possibly newer versions which differ only in the patch level. (For details, see the roadmap). Please release version 1.0.0 of your collection by this date! If 1.0.0 does not exist, the same 0.x.y version will be used in all of Ansible 2.10 without updates, and your 1.x.y release will not be included until Ansible 2.11 (unless you request an exception at a community working group meeting and go through a demanding manual process to vouch for backwards compatibility . . . you want to avoid this!).

Follow semantic versioning rules

Your collection versioning must follow all semver rules. This means:

  • Patch level releases can only contain bugfixes;
  • Minor releases can contain new features, new modules and plugins, and bugfixes, but must not break backwards compatibility;
  • Major releases can break backwards compatibility.

Changelogs and Porting Guide

Your collection should provide data for the Ansible 2.10 changelog and porting guide. The changelog and porting guide are automatically generated from ansible-base, and from the changelogs of the included collections. All changes from the breaking_changes, major_changes, removed_features and deprecated_features sections will appear in both the changelog and the porting guide. You have two options for providing changelog fragments to include:

  1. If possible, use the antsibull-changelog tool, which uses the same changelog fragment as the ansible/ansible repository (see the documentation).
  2. If you cannot use antsibull-changelog, you can provide the changelog in a machine-readable format as changelogs/changelog.yaml inside your collection (see the documentation of changelogs/changelog.yaml format).

If you cannot contribute to the integrated Ansible changelog using one of these methods, please provide a link to your collection's changelog by creating an issue in https://github.com/ansible-community/ansible-build-data/. If you do not provide changelogs/changelog.yml or a link, users will not be able to find out what changed in your collection from the Ansible changelog and porting guide.

Make sure your collection passes the sanity tests

Run ansible-test sanity --docker -v in the collection with the latest ansible-base or stable-2.10 ansible/ansible checkout.

Keep informed

Be sure you're subscribed to:

Questions and Feedback

If you have questions or want to provide feedback, please see the Feedback section in the collection requirements.

(Internal link to keep track of issues: ansible-collections/overview#102)

sort_list fails for a list of dictionaries

SUMMARY

Sorting of list of dictionaries using sorted fails from python 3

ISSUE TYPE
  • Bug Report
COMPONENT NAME

/netcommon/plugins/module_utils/network/common/utils.py

ANSIBLE VERSION
ansible 2.11.0.dev0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/gosriniv/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/gosriniv/Project/ansible/lib/ansible
  ansible collection location = /home/gosriniv/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/gosriniv/Project/ansible/bin/ansible
  python version = 3.6.5 (default, Sep  4 2019, 12:23:33) [GCC 9.0.1 20190312 (Red Hat 9.0.1-0.10)]

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
- set_fact:
    config:

      - name: Port-Channel5
        members:
         - member: Ethernet1
            mode: 'on'
          - member: Ethernet2
            mode: 'on'

    change_config:
      - name: Port-Channel5
        members:

          - member: Ethernet2
            mode: 'passive'

- name: Merge provided configuration with device configuration.
  become: true
  register: result
  arista.eos.eos_lag_interfaces:
    config: '{{ config }}'
    state: merged

- name: Merge provided configuration with device configuration, expect error.
  become: true
  ignore_errors: true
  register: result
  arista.eos.eos_lag_interfaces:
    config: '{{ change_config }}'
    state: merged



EXPECTED RESULTS

File "/tmp/ansible_arista.eos.eos_lag_interfaces_payload_nuoVCW/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible/module_utils/connection.py", line 195, in __rpc__
ansible.module_utils.connection.ConnectionError: channel-group 5 mode passive
% Cannot change mode; remove all members and try again.
veos(config-s-ansibl-if-Et2)#
fatal: [192.168.122.113]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/gosriniv/.ansible/tmp/ansible-local-17491bda6q2p1/ansible-tmp-1596816279.1235378-17864-161849618503111/AnsiballZ_eos_lag_interfaces.py\", line 113, in <module>\n    _ansiballz_main()\n  File \"/home/gosriniv/.ansible/tmp/ansible-local-17491bda6q2p1/ansible-tmp-1596816279.1235378-17864-161849618503111/AnsiballZ_eos_lag_interfaces.py\", line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/gosriniv/.ansible/tmp/ansible-local-17491bda6q2p1/ansible-tmp-1596816279.1235378-17864-161849618503111/AnsiballZ_eos_lag_interfaces.py\", line 54, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.arista.eos.plugins.modules.eos_lag_interfaces', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python2.7/runpy.py\", line 188, in run_module\n    fname, loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n    mod_name, mod_fname, mod_loader, pkg_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n    exec code in run_globals\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_nuoVCW/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/modules/eos_lag_interfaces.py\", line 340, in <module>\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_nuoVCW/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/modules/eos_lag_interfaces.py\", line 335, in main\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_nuoVCW/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 80, in execute_module\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_nuoVCW/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible/module_utils/connection.py\", line 195, in __rpc__\nansible.module_utils.connection.ConnectionError: channel-group 5 mode passive\r\n% Cannot change mode; remove all members and try again.\r\nveos(config-s-ansibl-if-Et2)#\n",
ACTUAL RESULTS
 File "/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/utils.py", line 156, in sort_list
TypeError: '<' not supported between instances of 'dict' and 'dict'
fatal: [eos-4.20.10]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/zuul/.ansible/tmp/ansible-local-63189jmcw5mlh/ansible-tmp-1596812412.5903585-63518-97223893771294/AnsiballZ_eos_lag_interfaces.py\", line 113, in <module>\n    _ansiballz_main()\n  File \"/home/zuul/.ansible/tmp/ansible-local-63189jmcw5mlh/ansible-tmp-1596812412.5903585-63518-97223893771294/AnsiballZ_eos_lag_interfaces.py\", line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/zuul/.ansible/tmp/ansible-local-63189jmcw5mlh/ansible-tmp-1596812412.5903585-63518-97223893771294/AnsiballZ_eos_lag_interfaces.py\", line 54, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.arista.eos.plugins.modules.eos_lag_interfaces', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/modules/eos_lag_interfaces.py\", line 340, in <module>\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/modules/eos_lag_interfaces.py\", line 335, in main\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 76, in execute_module\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 119, in set_config\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 146, in set_state\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 215, in _state_merged\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/config/lag_interfaces/lag_interfaces.py\", line 244, in set_config\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/utils.py\", line 357, in dict_diff\n  File \"/tmp/ansible_arista.eos.eos_lag_interfaces_payload_e2bg5h57/ansible_arista.eos.eos_lag_interfaces_payload.zip/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/utils.py\", line 156, in sort_list\nTypeError: '<' not supported between instances of 'dict' and 'dict'\n",


ipaddr ipv4('host') filter does not support /31 cidr

SUMMARY

ipv4('host') filter does not support /31 cidr

def _host_query(v):
if v.size == 1:
return str(v)
elif v.size > 1:
if v.ip != v.network:
return str(v.ip) + "/" + str(v.prefixlen)

ISSUE TYPE
  • Bug Report
COMPONENT NAME

plugins/filter/ipaddr.py

ANSIBLE VERSION

affects all

STEPS TO REPRODUCE

yml var from inventory:
ip_address: 192.168.1.0/31

In a jinja2 template use this var and apply the filter

{{ ip_address | ipv4('host') }}

EXPECTED RESULTS

192.168.1.0/31

ACTUAL RESULTS

Empty string

parse_xml fails w/ nested regex_replace

SUMMARY

Calling regex_replace() filter in the vars section of a parse_xml spec results in an error TemplateAssertionError: no filter named 'regex_replace'.

I regretfully don't know the code base well enough to understand why this is occurring.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

parse_xml

ANSIBLE VERSION
ansible 2.8.4
  config file = None
  configured module search path = [u'/home/dhagan/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dhagan/.local/lib/python2.7/site-packages/ansible
  executable location = /home/dhagan/.local/bin/ansible
  python version = 2.7.18 (default, May 27 2020, 12:45:48) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]

CONFIGURATION

OS / ENVIRONMENT

Amazon Linux 2
Previously tested on Ubuntu 18.04 LTS on Windows 10

STEPS TO REPRODUCE

Save example_vpn_output.xml from https://gist.github.com/dthvt/926d7793378c7863d90b8f9acb8679ba

Save parse_xml-aws-vpn-connection.yml from https://gist.github.com/dthvt/cdad42cdf3b99a2f9b056c6aaf2bb38e

Execute playbook below.

- name: XML
  hosts: localhost
  connection: local
  gather_facts: false

  tasks:
    - set_fact:
        xml: "{{ lookup('file', 'example_vpn_output.xml') }}"

    - name: parse xml
      debug:
        msg: "{{ xml | parse_xml('parse_xml-aws-vpn-connection.yml') }}"
EXPECTED RESULTS

The tunnel1_ike_pre_shared_key value is filtered through regex_replace(), thus removing the leading and trailing whitespace added by AWS API.

ACTUAL RESULTS
[~]$ ansible-playbook -vvvv playbook.yml 
ansible-playbook 2.8.4
  config file = None
  configured module search path = [u'/home/dhagan/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dhagan/.local/lib/python2.7/site-packages/ansible
  executable location = /home/dhagan/.local/bin/ansible-playbook
  python version = 2.7.18 (default, May 27 2020, 12:45:48) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method
 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

Loading callback plugin default of type stdout, v2.0 from /home/dhagan/.local/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

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

PLAY [XML] ***************************************************************************************************************************************************************************************************************************************************
META: ran handlers

TASK [set_fact] **********************************************************************************************************************************************************************************************************************************************
task path: /home/dhagan/playbook.yml:7
File lookup using /home/dhagan/example_vpn_output.xml as file
ok: [localhost] => {
    "ansible_facts": {
        "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<vpn_connection id=\"vpn-01d682f82965e8398\">\n  <customer_gateway_id>cgw-0da9023fee170110f</customer_gateway_id>\n  <vpn_gateway_id>vgw-097ca08d259cd98a7</vpn_gateway_id>\n  <vpn_connection_type>ipsec.1</vpn_connection_type>\n  <ipsec_tunnel>\n    <customer_gateway>\n      <tunnel_outside_address>\n        <ip_address>35.161.109.12</ip_address>\n      </tunnel_outside_address>\n      <tunnel_inside_address>\n        <ip_address>169.254.0.30</ip_address>\n        <network_mask>255.255.255.252</network_mask>\n        <network_cidr>30</network_cidr>\n      </tunnel_inside_address>\n      <bgp>\n        <asn>64520</asn>\n        <hold_time>30</hold_time>\n      </bgp>\n    </customer_gateway>\n    <vpn_gateway>\n      <tunnel_outside_address>\n        <ip_address>34.208.226.176</ip_address>\n      </tunnel_outside_address>\n      <tunnel_inside_address>\n        <ip_address>169.254.0.29</ip_address>\n        <network_mask>255.255.255.252</network_mask>\n        <network_cidr>30</network_cidr>\n      </tunnel_inside_address>\n      <bgp>\n        <asn>64522</asn>\n        <hold_time>30</hold_time>\n      </bgp>\n    </vpn_gateway>\n    <ike>\n      <authentication_protocol>sha1</authentication_protocol>\n      <encryption_protocol>aes-128-cbc</encryption_protocol>\n      <lifetime>28800</lifetime>\n      <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n      <mode>main</mode>\n      <pre_shared_key>\n        random.string.here\n      </pre_shared_key>\n    </ike>\n    <ipsec>\n      <protocol>esp</protocol>\n      <authentication_protocol>hmac-sha1-96</authentication_protocol>\n      <encryption_protocol>aes-128-cbc</encryption_protocol>\n      <lifetime>3600</lifetime>\n      <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n      <mode>tunnel</mode>\n      <clear_df_bit>true</clear_df_bit>\n      <fragmentation_before_encryption>true</fragmentation_before_encryption>\n      <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n      <dead_peer_detection>\n        <interval>10</interval>\n        <retries>3</retries>\n      </dead_peer_detection>\n    </ipsec>\n  </ipsec_tunnel>\n  <ipsec_tunnel>\n    <customer_gateway>\n      <tunnel_outside_address>\n        <ip_address>35.161.109.12</ip_address>\n      </tunnel_outside_address>\n      <tunnel_inside_address>\n        <ip_address>169.254.0.34</ip_address>\n        <network_mask>255.255.255.252</network_mask>\n        <network_cidr>30</network_cidr>\n      </tunnel_inside_address>\n      <bgp>\n        <asn>64520</asn>\n        <hold_time>30</hold_time>\n      </bgp>\n    </customer_gateway>\n    <vpn_gateway>\n      <tunnel_outside_address>\n        <ip_address>34.212.54.191</ip_address>\n      </tunnel_outside_address>\n      <tunnel_inside_address>\n        <ip_address>169.254.0.33</ip_address>\n        <network_mask>255.255.255.252</network_mask>\n        <network_cidr>30</network_cidr>\n      </tunnel_inside_address>\n      <bgp>\n        <asn>64522</asn>\n        <hold_time>30</hold_time>\n      </bgp>\n    </vpn_gateway>\n    <ike>\n      <authentication_protocol>sha1</authentication_protocol>\n      <encryption_protocol>aes-128-cbc</encryption_protocol>\n      <lifetime>28800</lifetime>\n      <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n      <mode>main</mode>\n      <pre_shared_key>\n        other_random.string.here\n      </pre_shared_key>\n    </ike>\n    <ipsec>\n      <protocol>esp</protocol>\n      <authentication_protocol>hmac-sha1-96</authentication_protocol>\n      <encryption_protocol>aes-128-cbc</encryption_protocol>\n      <lifetime>3600</lifetime>\n      <perfect_forward_secrecy>group2</perfect_forward_secrecy>\n      <mode>tunnel</mode>\n      <clear_df_bit>true</clear_df_bit>\n      <fragmentation_before_encryption>true</fragmentation_before_encryption>\n      <tcp_mss_adjustment>1379</tcp_mss_adjustment>\n      <dead_peer_detection>\n        <interval>10</interval>\n        <retries>3</retries>\n      </dead_peer_detection>\n    </ipsec>\n  </ipsec_tunnel>\n</vpn_connection>"
    }, 
    "changed": false
}

TASK [parse xml] *********************************************************************************************************************************************************************************************************************************************
task path: /home/dhagan/playbook.yml:10
The full traceback is:
Traceback (most recent call last):
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 145, in run
    res = self._execute()
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 592, in _execute
    self._task.post_validate(templar=templar)
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/playbook/task.py", line 268, in post_validate
    super(Task, self).post_validate(templar)
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/playbook/base.py", line 435, in post_validate
    value = templar.template(getattr(self, name))
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/template/__init__.py", line 584, in template
    disable_lookups=disable_lookups,
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/template/__init__.py", line 539, in template
    disable_lookups=disable_lookups,
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/template/__init__.py", line 804, in do_template
    res = j2_concat(rf)
  File "<template>", line 12, in root
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py", line 352, in parse_xml
    obj[name] = _extract_param(template, root, attrs, value)
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/plugins/filter/network.py", line 302, in _extract_param
    entry[item_key] = template(item_value, {'item': item_dict})
  File "/home/dhagan/.local/lib/python2.7/site-packages/ansible/module_utils/network/common/utils.py", line 457, in __call__
    value = self.env.from_string(value).render(variables)
  File "/home/dhagan/.local/lib/python2.7/site-packages/jinja2/environment.py", line 880, in from_string
    return cls.from_code(self, self.compile(source), globals, None)
  File "/home/dhagan/.local/lib/python2.7/site-packages/jinja2/environment.py", line 591, in compile
    self.handle_exception(exc_info, source_hint=source_hint)
  File "/home/dhagan/.local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<unknown>", line 1, in template
TemplateAssertionError: no filter named 'regex_replace'

fatal: [localhost]: FAILED! => {
    "msg": "Unexpected failure during module execution."
}

PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   


Unable to decode JSON from response to get_capabilities()

SUMMARY

netconf_rpc is unable to retrieve the remote device capabilities whereas a simple ssh CLI can.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

netconf_rpc

ANSIBLE VERSION
ansible 2.9.7
  config file = /etc/ansible/ansible.cfg
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis
CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 30
DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 180
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 200
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True
OS / ENVIRONMENT
controller host: Ubuntu focal 20.04
remote host: IOS-XEv 16.9.1
STEPS TO REPRODUCE
- name: Fetching schema list with JSON output
  hosts:
        - all
  vars:
        ansible_connection: netconf
        ansible_network_os: ios
        ansible_password: "{{ password }}"
        ansible_user: "{{ username }}"
  tasks:
        - netconf_rpc:
                content: |
                        <filter>
                                <netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
                                        <schemas/>
                                </netconf-state>
                        </filter>
                display: json
                rpc: get
EXPECTED RESULTS

Schema list

ACTUAL RESULTS
<XEv> ESTABLISH LOCAL CONNECTION FOR USER: admin
<XEv> EXEC /bin/bash -c '( umask 77 && mkdir -p "` echo .ansible/tmp/ansible-local-528692i2_32bae `"&& mkdir .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987 && echo ansible-tmp-1588091408.2229846-529412-225881761918987="` echo .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/network/netconf/netconf_rpc.py
<XEv> PUT .ansible/tmp/ansible-local-528692i2_32bae/tmphn9lug4u TO .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py
<XEv> EXEC /bin/bash -c 'chmod u+x .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/ .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py && sleep 0'
<XEv> EXEC /bin/bash -c '/usr/bin/python3 .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py && sleep 0'
<XEv> EXEC /bin/bash -c 'rm -f -r .ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py", line 156, in _exec_jsonrpc
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py", line 102, in <module>
    _ansiballz_main()
  File ".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File ".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib/python3.8/runpy.py", line 206, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py", line 264, in <module>
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py", line 240, in main
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py", line 119, in dispatch
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py", line 41, in get_connection
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py", line 55, in get_capabilities
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py", line 179, in __rpc__
  File "/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py", line 160, in _exec_jsonrpc
ansible.module_utils.connection.ConnectionError: Unable to decode JSON from response to get_capabilities(). Received 'None'.
fatal: [XEv]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py\", line 156, in _exec_jsonrpc\n  File \"/usr/lib/python3.8/json/__init__.py\", line 357, in loads\n    return _default_decoder.decode(s)\n  File \"/usr/lib/python3.8/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n  File \"/usr/lib/python3.8/json/decoder.py\", line 355, in raw_decode\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py\", line 102, in <module>\n    _ansiballz_main()\n  File \".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \".ansible/tmp/ansible-local-528692i2_32bae/ansible-tmp-1588091408.2229846-529412-225881761918987/AnsiballZ_netconf_rpc.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python3.8/runpy.py\", line 206, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 96, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 86, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py\", line 264, in <module>\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py\", line 240, in main\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py\", line 119, in dispatch\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py\", line 41, in get_connection\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/netconf/netconf.py\", line 55, in get_capabilities\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py\", line 179, in __rpc__\n  File \"/tmp/ansible_netconf_rpc_payload_de94_hi9/ansible_netconf_rpc_payload.zip/ansible/module_utils/connection.py\", line 160, in _exec_jsonrpc\nansible.module_utils.connection.ConnectionError: Unable to decode JSON from response to get_capabilities(). Received 'None'.\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
CLI RESULTS
$ ssh -p 830 admin@${XEv_ip_addr} -s netconf
admin@<XEv_ip_addr>'s password: 
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
...

netconf_config on iosxr

SUMMARY

I'm trying to create a simple playbook using iosxr and netconf, and I'm experiencing issues. Ansible errors out when trying to log into the netconf SSH session.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

netconf_config

ANSIBLE VERSION
ansible 2.9.6
  config file = None
  configured module search path = [u'/home/dave/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dave/.local/lib/python2.7/site-packages/ansible
  executable location = /home/dave/.local/bin/ansible
  python version = 2.7.17 (default, Nov  7 2019, 10:07:09) [GCC 7.4.0]
CONFIGURATION
Nothing
OS / ENVIRONMENT

Cisco IOS XR Software, Version 6.6.3

STEPS TO REPRODUCE
---
- name: Configure Hostname on IOS XR
  hosts: all
  connection: netconf

  tasks:
    - name: Configure IS-IS
      netconf_config:
        content: |
          <host-names xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg">
            <host-name>Test</host-name>
          </host-names>
EXPECTED RESULTS

The device being logged into and configured.

ACTUAL RESULTS

https://gist.github.com/geordish/c6d4d9c39f556861b7ad97a6ebb79c3e
https://gist.github.com/geordish/533c58158a4a17156b18adebd044583b

Check for missing commits vs devel

SUMMARY

The "Big Migration" has now taken place.

As this collection already exists, we need to carefully check to see if any further commits went into devel since this repo was created.

Please check the contents of https://github.com/ansible-collection-migration/ansible.netcommon against this repo

In particular:

  • Please do a per-file level diff against every file in the ansible-collection-migration repo and this one
  • Pay care to files added and removed.
  • During the last two weeks there have been lots of fixes, especially around and tests, dependencies, and new collection features e.g. meta/action_groups.yml
ISSUE TYPE
  • Bug Report

httpapi checkpoint connection cannot specific domain

SUMMARY

Previously open a issue on wrong repo ansible/ansible#70362 Been redirected here by @mkrizek .
I'dont find any solution to specify a domain to connect on.

What is the var to use to specify wich domain (mds solution checkpoint).

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
Ansible 2.9.5
OS / ENVIRONMENT
STEPS TO REPRODUCE
---
- name: example_playbook
  hosts: all
  connection: httpapi
  tasks:
    - name: show-host
      cp_mgmt_host_facts:
        name: exemple_srv

INVENTORY

---
ansible_checkpoint_domain: domain   <--- THIS IS THE VAR I CANNOT FIND
ansible_network_os: checkpoint
ansible_user: user
ansible_password: pwd
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False

EXPECTED RESULTS

Var to specify the multi domain server name for CheckPoint R80.40

ACTUAL RESULTS
"OBJECTS NOT FOUND" because ansible module checkpoint python don't specify domain.
If i use mds facts module, everything works fine.

Ansible Reports Validate Not Supported by Netconf Server when Enabled in Netconf

SUMMARY

Although validate is enabled in netconf, Ansible reports it is unable to validate

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible.netcommon.netconf_config

ANSIBLE VERSION
2020-08-06 18:51:15,841 p=32638 u=remote_user n=ansible | ansible-playbook 2.9.11
  config file = /home/remote_user/ansible/ansible.cfg
  configured module search path = ['/home/remote_user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/remote_user/ansible/ansible_venv/lib64/python3.7/site-packages/ansible
  executable location = /home/remote_user/ansible/ansible_venv/bin/ansible-playbook
  python version = 3.7.6 (default, Feb 26 2020, 20:54:15) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]
OS / ENVIRONMENT

netconf version 1.0 and 1.1

STEPS TO REPRODUCE
    - name: Configure interfaces via NETCONF OpenConfig YANG Model
      ansible.netcommon.netconf_config:
        target: candidate
        timeout: 300
        commit: no
        validate: yes
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
EXPECTED RESULTS

netconf_config allows validate

ACTUAL RESULTS
2020-08-06 18:51:29,356 p=32638 u=remote_user n=ansible | fatal: [remote_host]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "backup": false,
            "backup_options": null,
            "commit": false,
            "confirm": 0,
            "confirm_commit": false,
            "content": null,
            "default_operation": null,
            "delete": false,
            "error_option": "stop-on-error",
            "format": "xml",
            "get_filter": null,
            "host": null,
            "hostkey_verify": true,
            "lock": "always",
            "look_for_keys": true,
            "password": null,
            "port": 830,
            "save": false,
            "source_datastore": null,
            "src": null,
            "ssh_keyfile": null,
            "target": "candidate",
            "timeout": 300,
            "username": null,
            "validate": true
        }
    },
    "msg": "validate is not supported by this netconf server"
}

command timeout triggered, timeout value is 30 secs failure message using cli_command on dellos10 switch

From @srivaa31 on Jul 14, 2020 10:33

SUMMARY

shutdown command on switch interface consistently fails with "command timeout triggered, timeout value is 30 secs" message

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cli_command module

ANSIBLE VERSION
ansible 2.9.4
  config file = /var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
CONFIGURATION
DEFAULT_PRIVATE_KEY_FILE(/var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg) = /root/.ssh/id_rsa
DEFAULT_REMOTE_USER(/var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg) = root
DISPLAY_SKIPPED_HOSTS(/var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg) = False
HOST_KEY_CHECKING(/var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg) = False
INTERPRETER_PYTHON(/var/lib/jenkins/workspace/Ansible_QA/Automation/ansible.cfg) = auto

OS / ENVIRONMENT

CentOS Linux release 8.1.1911 (Core)

STEPS TO REPRODUCE

switch_shutdown.yml

---
- name: shutdown same ports on all switches
  debug:
    msg: "Shutdown test case "

- name: Add config mode as first command
  set_fact:
    cli_switch_commands:
      - config

- name: Add commands for each port shutdown
  vars:
    current_port_command: "interface Tengigabitethernet 0/{{ item }}"
  set_fact:
    cli_switch_commands: "{{ cli_switch_commands + [current_port_command, 'shutdown'] }}"
  loop: "{{ shutdown_ports }}"

- name: Send all commands to switch
  debug:
    msg: "{{item}}"
  loop: "{{ cli_switch_commands }}"

- name: sending....
  cli_command:
    command: "{{ item }}"
  loop: "{{ cli_switch_commands }}"
  delegate_to: TOR_A

switch.yml <- playbook file

---
- name: Shutdown ports on TOR switches
  hosts: switches
  gather_facts: false
  roles:
     - switch_test

switch_test is the role file
task file is switch_shutdown.yml

Content of hosts file below
/etc/ansible/hosts

[switches]
TOR_A ansible_host=100.80.81.248 ansible_user=admin ansible_pass=Raid4us! ansible_connection=network_cli ansible_network_os=dellos10 ansible_become=yes ansible_become_method=enable ansible_command_timeout=30
EXPECTED RESULTS

Successful login to switch and shut down of specified port

ACTUAL RESULTS
failed: [TOR_A -> 100.80.81.248] (item=config) => {"ansible_loop_var": "item", "changed": false, "item": "config", "msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}
failed: [TOR_A -> 100.80.81.248] (item=interface Tengigabitethernet 0/34) => {"ansible_loop_var": "item", "changed": false, "item": "interface Tengigabitethernet 0/34", "msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}
failed: [TOR_A -> 100.80.81.248] (item=shutdown) => {"ansible_loop_var": "item", "changed": false, "item": "shutdown", "msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}

Copied from original issue: ansible/ansible#70633

netconf_rpc task fails due to encoding issue in the response

SUMMARY
ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
ansible 2.9.13
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE
 - name: xml
    netconf_rpc:
      rpc: get
      display: xml
      content: |
        <filter type="subtree">
         < payload >
        </filter>
    register: out
EXPECTED RESULTS

SHould pass

ACTUAL RESULTS
2020-10-01 14:08:46,140 p=862827 u=root n=ncclient.transport.ssh |
[host 10.212.12.16 session-id 148] Received message from host
2020-10-01 14:08:46,141 p=862827 u=root n=ansible | jsonrpc response:
{"jsonrpc": "2.0", "id": "d9df6042-c78a-486a-b9c3-6e2b38083fb6",
"result": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><data
xmlns:fabrics=\"urn:kaloom:faas:fabrics\"
xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"
xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><fabrics:Fabric><fabrics:FabricID>212</fabrics:FabricID><fabrics:Node><fabrics:NodeID>e9fa6779-c667-4733-8db2-61f904b8205e</fabrics:NodeID><fabrics:Name>aj08025933-upf-31u</fabrics:Name></fabrics:Node><fabrics:Node><fabrics:NodeID>ab48b157-fd08-46af-9355-5384e90979b4</fabrics:NodeID><fabrics:Name>ak18000735-leaf-29u</fabrics:Name></fabrics:Node><fabrics:Node><fabrics:NodeID>1c6e769f-02f0-41f7-a0f5-957d54d6e788</fabrics:NodeID><fabrics:Name>controller-1</fabrics:Name></fabrics:Node></fabrics:Fabric></data>"}
2020-10-01 14:08:46,161 p=862943 u=root n=ansible | <10.212.12.16>
EXEC /bin/sh -c 'rm -f -r
/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/
> /dev/null 2>&1 && sleep 0'
2020-10-01 14:08:46,174 p=862814 u=root n=ansible | The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 102, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-local-862814_qg5scng/ansible-tmp-1601575725.3798058-862943-225523550103615/AnsiballZ_netconf_rpc.py",
line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.network.netconf.netconf_rpc',
init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
line 264, in <module>
  File "/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/modules/network/netconf/netconf_rpc.py",
line 246, in main
  File "/tmp/ansible_netconf_rpc_payload_ci30aiuw/ansible_netconf_rpc_payload.zip/ansible/module_utils/network/common/netconf.py",
line 141, in remove_namespaces
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
174, in __init__
    self.__doc = self.remove_namespaces(self.__result)
  File "/usr/local/lib/python3.6/site-packages/ncclient/xml_.py", line
222, in remove_namespaces
    parser=self.__parser))),
  File "src/lxml/etree.pyx", line 3467, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1856, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1068, in
lxml.etree._BaseParser._parseUnicodeDoc
  File "src/lxml/parser.pxi", line 601, in
lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 640, in lxml.etree._raiseParseError
  File "<string>", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1

filter nthhost fails with negative index is bigger than the number of hosts addresses in the network

SUMMARY

filter nthhost creates an exception with negative index when the absolute value is bigger than the number of hosts addresses in the network

ISSUE TYPE
  • Bug Report
COMPONENT NAME

filter nthhost

ANSIBLE VERSION
(ansible-devel) [baptistemm@cactus ansible-test]$ ansible --version
ansible 2.9.10
  config file = None
  configured module search path = ['/home/baptistemm/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible
  executable location = /home/baptistemm/Code/ansible-devel/bin/ansible
  python version = 3.8.2 (default, Feb 28 2020, 00:00:00) [GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)]
CONFIGURATION
<empty>
STEPS TO REPRODUCE
"{{ '192.168.0.0/8' | nthhost(-1) }}"
192.168.0.255

"{{ '192.168.0.0/8' | nthhost(-265) }}"
Traceback ...
 
EXPECTED RESULTS

I don't know what would the correct result, False ?

ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 112, in run
    item_results = self._run_loop(items)
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 366, in _run_loop
    res = self._execute(variables=task_vars)
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 587, in _execute
    self._task.post_validate(templar=templar)
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/playbook/task.py", line 299, in post_validate
    super(Task, self).post_validate(templar)
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/playbook/base.py", line 431, in post_validate
    value = templar.template(getattr(self, name))
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/template/__init__.py", line 617, in template
    d[k] = self.template(
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/template/__init__.py", line 571, in template
    result = self.do_template(
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/template/__init__.py", line 836, in do_template
    res = j2_concat(rf)
  File "<template>", line 12, in root
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/ansible/plugins/filter/ipaddr.py", line 837, in nthhost
    return value[nth]
  File "/home/baptistemm/Code/ansible-devel/lib/python3.8/site-packages/netaddr/ip/__init__.py", line 730, in __getitem__
    raise IndexError('index out range for address range size!')
IndexError: index out range for address range size!
fatal: [localhost]: FAILED! => {
    "msg": "Unexpected failure during module execution."
}

Error reading SSH protocol banner timeout when using network_cli connection

Copying over from Ansible Core repo: ansible/ansible#69267

SUMMARY

When using the network_cli we are seeing issues with ssh protocol banner timeout coming from paramiko. When running the SSH proxy command manually from the server it has no problems connecting.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

network_cli connection plugin

ANSIBLE VERSION
ansible 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Aug  7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

I've also tested this with ansible2.8.4 with python2.7.5 and same issue occurs

CONFIGURATION
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 500
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
PARAMIKO_HOST_KEY_AUTO_ADD(/etc/ansible/ansible.cfg) = True
PARAMIKO_LOOK_FOR_KEYS(/etc/ansible/ansible.cfg) = False
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT
2.6.32-754.17.1.el6.x86_64 on centos-6.10 on ProLiant DL360p Gen8 bastion server

Name        : openssh
Arch        : x86_64
Version     : 5.3p1
Release     : 124.el6_10

Cisco:
Software
  BIOS: version 07.59
  NXOS: version 7.0(3)I7(4)
  BIOS compile time:  08/26/2016
  NXOS image file is: bootflash:///nxos.7.0.3.I7.4.bin
  NXOS compile time:  6/14/2018 2:00:00 [06/14/2018 09:49:04]
Hardware
  cisco Nexus9000 C9372TX chassis

STEPS TO REPRODUCE
  1. Create playbook below
  2. Create inventory containing cisco device with the following group_vars:
ansible_connection: network_cli
ansible_network_os: nxos
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastionhost.1234"'
  1. Run your playbook
- name: "Uploading file: {{ image_file }}"
  hosts: all
  connection: network_cli
  # This is how many parallel tasks are launched at the same time.
  # We don't want to clog the network. Set to 4 due to "MaxAuthTries" on sshd config on server.
  serial: 4
  gather_facts: no
  ignore_errors: yes
  vars:
    ansible_command_timeout: 600
    ansible_network_os: nxos
    _image_file: "{{ image_file }}"
    _remote_scp_server: "{{ remote_scp_server }}"
    # Free space required is different if image was already uploaded or not.
    # For 9ks this is not a problem, but the 3k device I've been working on,
    # has 1.8GB total. Previous image could be 700MB, next image another 700...
    # Will set this to the 700 for an image + some extra space for the upgrade.
    _free_space_required: "{{ free_space_required | default(1073741824) }}"
  tasks:
    - nxos_facts:
        gather_subset:
          - config
EXPECTED RESULTS

To be able to successfully connect to the box and pull facts

ACTUAL RESULTS

SSH protocol banner timeout

2020-04-30 04:18:30,135 p=53 u=root n=ansible |     53 1588220310.13553: starting run
2020-04-30 04:18:30,283 p=53 u=root n=ansible | ansible-playbook 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug  7 2019, 17:28:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
2020-04-30 04:18:30,283 p=53 u=root n=ansible | Using /etc/ansible/ansible.cfg as config file
2020-04-30 04:18:34,999 p=53 u=root n=ansible |     53 1588220314.99948: Added group all to inventory
2020-04-30 04:18:34,999 p=53 u=root n=ansible |     53 1588220314.99977: Added group ungrouped to inventory
2020-04-30 04:18:34,999 p=53 u=root n=ansible |     53 1588220314.99991: Group all now contains ungrouped
2020-04-30 04:18:35,000 p=53 u=root n=ansible |     53 1588220315.00001: Examining possible inventory source: /root/inventory
2020-04-30 04:18:35,000 p=53 u=root n=ansible | setting up inventory plugins
2020-04-30 04:18:35,001 p=53 u=root n=ansible |     53 1588220315.00185: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cache
2020-04-30 04:18:35,003 p=53 u=root n=ansible |     53 1588220315.00380: Loading CacheModule 'memory' from /usr/local/lib/python3.6/site-packages/ansible/plugins/cache/memory.py
2020-04-30 04:18:35,004 p=53 u=root n=ansible |     53 1588220315.00419: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory
2020-04-30 04:18:35,006 p=53 u=root n=ansible |     53 1588220315.00596: Loading InventoryModule 'host_list' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/host_list.py
2020-04-30 04:18:35,010 p=53 u=root n=ansible |     53 1588220315.01074: Loaded config def from plugin (inventory/script)
2020-04-30 04:18:35,010 p=53 u=root n=ansible |     53 1588220315.01087: Loading InventoryModule 'script' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/script.py
2020-04-30 04:18:35,012 p=53 u=root n=ansible |     53 1588220315.01273: Loading InventoryModule 'auto' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/auto.py
2020-04-30 04:18:35,017 p=53 u=root n=ansible |     53 1588220315.01701: Loaded config def from plugin (inventory/yaml)
2020-04-30 04:18:35,017 p=53 u=root n=ansible |     53 1588220315.01713: Loading InventoryModule 'yaml' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/yaml.py
2020-04-30 04:18:35,022 p=53 u=root n=ansible |     53 1588220315.02199: Loading InventoryModule 'ini' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/ini.py
2020-04-30 04:18:35,023 p=53 u=root n=ansible |     53 1588220315.02358: Loading InventoryModule 'toml' from /usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/toml.py
2020-04-30 04:18:35,023 p=53 u=root n=ansible |     53 1588220315.02373: Attempting to use plugin host_list (/usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/host_list.py)
2020-04-30 04:18:35,023 p=53 u=root n=ansible | host_list declined parsing /root/inventory as it did not pass its verify_file() method
2020-04-30 04:18:35,023 p=53 u=root n=ansible |     53 1588220315.02388: Attempting to use plugin script (/usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/script.py)
2020-04-30 04:18:35,024 p=53 u=root n=ansible | script declined parsing /root/inventory as it did not pass its verify_file() method
2020-04-30 04:18:35,024 p=53 u=root n=ansible |     53 1588220315.02405: Attempting to use plugin auto (/usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/auto.py)
2020-04-30 04:18:35,024 p=53 u=root n=ansible | auto declined parsing /root/inventory as it did not pass its verify_file() method
2020-04-30 04:18:35,024 p=53 u=root n=ansible |     53 1588220315.02417: Attempting to use plugin yaml (/usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/yaml.py)
2020-04-30 04:18:35,025 p=53 u=root n=ansible |     53 1588220315.02507: Loading data from /root/inventory
2020-04-30 04:18:35,025 p=53 u=root n=ansible |     53 1588220315.02567: /root/inventory was not parsable by yaml
2020-04-30 04:18:35,026 p=53 u=root n=ansible |     53 1588220315.02619: Attempting to use plugin ini (/usr/local/lib/python3.6/site-packages/ansible/plugins/inventory/ini.py)
2020-04-30 04:18:35,027 p=53 u=root n=ansible |     53 1588220315.02744: set inventory_file for tordevice.REDACTED
2020-04-30 04:18:35,027 p=53 u=root n=ansible |     53 1588220315.02757: set inventory_dir for tordevice.REDACTED
2020-04-30 04:18:35,027 p=53 u=root n=ansible |     53 1588220315.02764: Added host tordevice.REDACTED to inventory
2020-04-30 04:18:35,027 p=53 u=root n=ansible |     53 1588220315.02775: Added host tordevice.REDACTED to group ungrouped
2020-04-30 04:18:35,028 p=53 u=root n=ansible | Parsed /root/inventory inventory source with ini plugin
2020-04-30 04:18:35,028 p=53 u=root n=ansible |     53 1588220315.02819: Reconcile groups and hosts in inventory.
2020-04-30 04:18:35,028 p=53 u=root n=ansible |     53 1588220315.02843: Loading CacheModule 'memory' from /usr/local/lib/python3.6/site-packages/ansible/plugins/cache/memory.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,043 p=53 u=root n=ansible |     53 1588220315.04362: Loaded config def from plugin (connection/buildah)
2020-04-30 04:18:35,043 p=53 u=root n=ansible |     53 1588220315.04389: Loading Connection 'buildah' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/buildah.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,049 p=53 u=root n=ansible |     53 1588220315.04910: Loaded config def from plugin (connection/chroot)
2020-04-30 04:18:35,049 p=53 u=root n=ansible |     53 1588220315.04925: Loading Connection 'chroot' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/chroot.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,056 p=53 u=root n=ansible |     53 1588220315.05659: Loaded config def from plugin (connection/docker)
2020-04-30 04:18:35,056 p=53 u=root n=ansible |     53 1588220315.05676: Loading Connection 'docker' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/docker.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,059 p=53 u=root n=ansible |     53 1588220315.05963: Loaded config def from plugin (connection/funcd)
2020-04-30 04:18:35,099 p=53 u=root n=ansible |     53 1588220315.09948: Loaded config def from plugin (connection/httpapi)
2020-04-30 04:18:35,099 p=53 u=root n=ansible |     53 1588220315.09972: Loading Connection 'httpapi' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/httpapi.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,103 p=53 u=root n=ansible |     53 1588220315.10319: Loaded config def from plugin (connection/iocage)
2020-04-30 04:18:35,103 p=53 u=root n=ansible |     53 1588220315.10334: Loading Connection 'iocage' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/iocage.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,106 p=53 u=root n=ansible |     53 1588220315.10624: Loaded config def from plugin (connection/jail)
2020-04-30 04:18:35,106 p=53 u=root n=ansible |     53 1588220315.10638: Loading Connection 'jail' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/jail.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,127 p=53 u=root n=ansible |     53 1588220315.12694: Loaded config def from plugin (connection/kubectl)
2020-04-30 04:18:35,127 p=53 u=root n=ansible |     53 1588220315.12709: Loading Connection 'kubectl' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/kubectl.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,129 p=53 u=root n=ansible |     53 1588220315.12948: Loaded config def from plugin (connection/libvirt_lxc)
2020-04-30 04:18:35,129 p=53 u=root n=ansible |     53 1588220315.12962: Loading Connection 'libvirt_lxc' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/libvirt_lxc.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,131 p=53 u=root n=ansible |     53 1588220315.13125: Loading Connection 'local' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/local.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,134 p=53 u=root n=ansible |     53 1588220315.13463: Loaded config def from plugin (connection/lxc)
2020-04-30 04:18:35,134 p=53 u=root n=ansible |     53 1588220315.13478: Loading Connection 'lxc' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/lxc.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,138 p=53 u=root n=ansible |     53 1588220315.13801: Loaded config def from plugin (connection/lxd)
2020-04-30 04:18:35,138 p=53 u=root n=ansible |     53 1588220315.13815: Loading Connection 'lxd' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/lxd.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,154 p=53 u=root n=ansible |     53 1588220315.15462: Loaded config def from plugin (connection/napalm)
2020-04-30 04:18:35,154 p=53 u=root n=ansible |     53 1588220315.15480: Loading Connection 'napalm' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/napalm.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,177 p=53 u=root n=ansible |     53 1588220315.17776: Loaded config def from plugin (connection/netconf)
2020-04-30 04:18:35,177 p=53 u=root n=ansible |     53 1588220315.17793: Loading Connection 'netconf' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/netconf.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,214 p=53 u=root n=ansible |     53 1588220315.21441: Loaded config def from plugin (connection/network_cli)
2020-04-30 04:18:35,214 p=53 u=root n=ansible |     53 1588220315.21458: Loading Connection 'network_cli' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,231 p=53 u=root n=ansible |     53 1588220315.23104: Loaded config def from plugin (connection/oc)
2020-04-30 04:18:35,231 p=53 u=root n=ansible |     53 1588220315.23120: Loading Connection 'oc' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/oc.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,253 p=53 u=root n=ansible |     53 1588220315.25331: Loaded config def from plugin (connection/paramiko_ssh)
2020-04-30 04:18:35,253 p=53 u=root n=ansible |     53 1588220315.25348: Loading Connection 'paramiko_ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/paramiko_ssh.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,282 p=53 u=root n=ansible |     53 1588220315.28243: Loaded config def from plugin (connection/persistent)
2020-04-30 04:18:35,282 p=53 u=root n=ansible |     53 1588220315.28275: Loading Connection 'persistent' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/persistent.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,286 p=53 u=root n=ansible |     53 1588220315.28663: Loaded config def from plugin (connection/podman)
2020-04-30 04:18:35,286 p=53 u=root n=ansible |     53 1588220315.28678: Loading Connection 'podman' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/podman.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,325 p=53 u=root n=ansible |     53 1588220315.32570: Loaded config def from plugin (connection/psrp)
2020-04-30 04:18:35,325 p=53 u=root n=ansible |     53 1588220315.32588: Loading Connection 'psrp' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/psrp.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,329 p=53 u=root n=ansible |     53 1588220315.32895: Loaded config def from plugin (connection/qubes)
2020-04-30 04:18:35,329 p=53 u=root n=ansible |     53 1588220315.32910: Loading Connection 'qubes' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/qubes.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,330 p=53 u=root n=ansible |     53 1588220315.33058: Loading Connection 'saltstack' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/saltstack.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,370 p=53 u=root n=ansible |     53 1588220315.37048: Loaded config def from plugin (connection/ssh)
2020-04-30 04:18:35,370 p=53 u=root n=ansible |     53 1588220315.37065: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,387 p=53 u=root n=ansible |     53 1588220315.38750: Loaded config def from plugin (connection/vmware_tools)
2020-04-30 04:18:35,387 p=53 u=root n=ansible |     53 1588220315.38765: Loading Connection 'vmware_tools' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/vmware_tools.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,405 p=53 u=root n=ansible |     53 1588220315.40552: Loaded config def from plugin (connection/winrm)
2020-04-30 04:18:35,405 p=53 u=root n=ansible |     53 1588220315.40569: Loading Connection 'winrm' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/winrm.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,407 p=53 u=root n=ansible |     53 1588220315.40790: Loaded config def from plugin (connection/zone)
2020-04-30 04:18:35,408 p=53 u=root n=ansible |     53 1588220315.40804: Loading Connection 'zone' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/zone.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,410 p=53 u=root n=ansible |     53 1588220315.41076: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments
2020-04-30 04:18:35,412 p=53 u=root n=ansible |     53 1588220315.41254: Loading ModuleDocFragment 'shell_windows' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_windows.py
2020-04-30 04:18:35,417 p=53 u=root n=ansible |     53 1588220315.41707: Loaded config def from plugin (shell/cmd)
2020-04-30 04:18:35,417 p=53 u=root n=ansible |     53 1588220315.41720: Loading ShellModule 'cmd' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/cmd.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,418 p=53 u=root n=ansible |     53 1588220315.41861: Loading ModuleDocFragment 'shell_common' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_common.py
2020-04-30 04:18:35,426 p=53 u=root n=ansible |     53 1588220315.42625: Loaded config def from plugin (shell/csh)
2020-04-30 04:18:35,426 p=53 u=root n=ansible |     53 1588220315.42638: Loading ShellModule 'csh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/csh.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,427 p=53 u=root n=ansible |     53 1588220315.42789: Loading ModuleDocFragment 'shell_common' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,435 p=53 u=root n=ansible |     53 1588220315.43545: Loaded config def from plugin (shell/fish)
2020-04-30 04:18:35,435 p=53 u=root n=ansible |     53 1588220315.43560: Loading ShellModule 'fish' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/fish.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,437 p=53 u=root n=ansible |     53 1588220315.43696: Loading ModuleDocFragment 'shell_windows' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_windows.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,441 p=53 u=root n=ansible |     53 1588220315.44125: Loaded config def from plugin (shell/powershell)
2020-04-30 04:18:35,441 p=53 u=root n=ansible |     53 1588220315.44137: Loading ShellModule 'powershell' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/powershell.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,442 p=53 u=root n=ansible |     53 1588220315.44258: Loading ModuleDocFragment 'shell_common' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_common.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,450 p=53 u=root n=ansible |     53 1588220315.45083: Loaded config def from plugin (shell/sh)
2020-04-30 04:18:35,450 p=53 u=root n=ansible |     53 1588220315.45096: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,462 p=53 u=root n=ansible |     53 1588220315.46282: Loaded config def from plugin (become/doas)
2020-04-30 04:18:35,462 p=53 u=root n=ansible |     53 1588220315.46295: Loading BecomeModule 'doas' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/doas.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,472 p=53 u=root n=ansible |     53 1588220315.47234: Loaded config def from plugin (become/dzdo)
2020-04-30 04:18:35,472 p=53 u=root n=ansible |     53 1588220315.47247: Loading BecomeModule 'dzdo' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/dzdo.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,476 p=53 u=root n=ansible |     53 1588220315.47611: Loaded config def from plugin (become/enable)
2020-04-30 04:18:35,476 p=53 u=root n=ansible |     53 1588220315.47624: Loading BecomeModule 'enable' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/enable.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,487 p=53 u=root n=ansible |     53 1588220315.48751: Loaded config def from plugin (become/ksu)
2020-04-30 04:18:35,487 p=53 u=root n=ansible |     53 1588220315.48764: Loading BecomeModule 'ksu' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/ksu.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,497 p=53 u=root n=ansible |     53 1588220315.49731: Loaded config def from plugin (become/machinectl)
2020-04-30 04:18:35,497 p=53 u=root n=ansible |     53 1588220315.49744: Loading BecomeModule 'machinectl' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/machinectl.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,508 p=53 u=root n=ansible |     53 1588220315.50838: Loaded config def from plugin (become/pbrun)
2020-04-30 04:18:35,508 p=53 u=root n=ansible |     53 1588220315.50852: Loading BecomeModule 'pbrun' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/pbrun.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,520 p=53 u=root n=ansible |     53 1588220315.52075: Loaded config def from plugin (become/pfexec)
2020-04-30 04:18:35,520 p=53 u=root n=ansible |     53 1588220315.52089: Loading BecomeModule 'pfexec' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/pfexec.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,528 p=53 u=root n=ansible |     53 1588220315.52864: Loaded config def from plugin (become/pmrun)
2020-04-30 04:18:35,528 p=53 u=root n=ansible |     53 1588220315.52879: Loading BecomeModule 'pmrun' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/pmrun.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,537 p=53 u=root n=ansible |     53 1588220315.53716: Loaded config def from plugin (become/runas)
2020-04-30 04:18:35,537 p=53 u=root n=ansible |     53 1588220315.53730: Loading BecomeModule 'runas' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/runas.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,546 p=53 u=root n=ansible |     53 1588220315.54680: Loaded config def from plugin (become/sesu)
2020-04-30 04:18:35,546 p=53 u=root n=ansible |     53 1588220315.54694: Loading BecomeModule 'sesu' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/sesu.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,558 p=53 u=root n=ansible |     53 1588220315.55827: Loaded config def from plugin (become/su)
2020-04-30 04:18:35,558 p=53 u=root n=ansible |     53 1588220315.55843: Loading BecomeModule 'su' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/su.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,567 p=53 u=root n=ansible |     53 1588220315.56790: Loaded config def from plugin (become/sudo)
2020-04-30 04:18:35,568 p=53 u=root n=ansible |     53 1588220315.56804: Loading BecomeModule 'sudo' from /usr/local/lib/python3.6/site-packages/ansible/plugins/become/sudo.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,568 p=53 u=root n=ansible |     53 1588220315.56839: Loading data from /root/test.yaml
2020-04-30 04:18:35,576 p=53 u=root n=ansible |     53 1588220315.57599: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/action
2020-04-30 04:18:35,577 p=53 u=root n=ansible |     53 1588220315.57722: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/action/__pycache__
2020-04-30 04:18:35,598 p=53 u=root n=ansible |     53 1588220315.59877: trying /usr/local/lib/python3.6/site-packages/ansible/modules
2020-04-30 04:18:35,599 p=53 u=root n=ansible |     53 1588220315.59908: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity
2020-04-30 04:18:35,599 p=53 u=root n=ansible |     53 1588220315.59929: trying /usr/local/lib/python3.6/site-packages/ansible/modules/source_control
2020-04-30 04:18:35,599 p=53 u=root n=ansible |     53 1588220315.59969: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management
2020-04-30 04:18:35,599 p=53 u=root n=ansible |     53 1588220315.59992: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network
2020-04-30 04:18:35,600 p=53 u=root n=ansible |     53 1588220315.60044: trying /usr/local/lib/python3.6/site-packages/ansible/modules/storage
2020-04-30 04:18:35,600 p=53 u=root n=ansible |     53 1588220315.60060: trying /usr/local/lib/python3.6/site-packages/ansible/modules/utilities
2020-04-30 04:18:35,600 p=53 u=root n=ansible |     53 1588220315.60074: trying /usr/local/lib/python3.6/site-packages/ansible/modules/clustering
2020-04-30 04:18:35,600 p=53 u=root n=ansible |     53 1588220315.60095: trying /usr/local/lib/python3.6/site-packages/ansible/modules/net_tools
2020-04-30 04:18:35,601 p=53 u=root n=ansible |     53 1588220315.60129: trying /usr/local/lib/python3.6/site-packages/ansible/modules/system
2020-04-30 04:18:35,602 p=53 u=root n=ansible |     53 1588220315.60232: trying /usr/local/lib/python3.6/site-packages/ansible/modules/commands
2020-04-30 04:18:35,602 p=53 u=root n=ansible |     53 1588220315.60254: trying /usr/local/lib/python3.6/site-packages/ansible/modules/monitoring
2020-04-30 04:18:35,603 p=53 u=root n=ansible |     53 1588220315.60305: trying /usr/local/lib/python3.6/site-packages/ansible/modules/files
2020-04-30 04:18:35,603 p=53 u=root n=ansible |     53 1588220315.60343: trying /usr/local/lib/python3.6/site-packages/ansible/modules/messaging
2020-04-30 04:18:35,603 p=53 u=root n=ansible |     53 1588220315.60354: trying /usr/local/lib/python3.6/site-packages/ansible/modules/web_infrastructure
2020-04-30 04:18:35,603 p=53 u=root n=ansible |     53 1588220315.60392: trying /usr/local/lib/python3.6/site-packages/ansible/modules/notification
2020-04-30 04:18:35,604 p=53 u=root n=ansible |     53 1588220315.60440: trying /usr/local/lib/python3.6/site-packages/ansible/modules/packaging
2020-04-30 04:18:35,604 p=53 u=root n=ansible |     53 1588220315.60452: trying /usr/local/lib/python3.6/site-packages/ansible/modules/inventory
2020-04-30 04:18:35,604 p=53 u=root n=ansible |     53 1588220315.60465: trying /usr/local/lib/python3.6/site-packages/ansible/modules/crypto
2020-04-30 04:18:35,605 p=53 u=root n=ansible |     53 1588220315.60499: trying /usr/local/lib/python3.6/site-packages/ansible/modules/database
2020-04-30 04:18:35,605 p=53 u=root n=ansible |     53 1588220315.60515: trying /usr/local/lib/python3.6/site-packages/ansible/modules/cloud
2020-04-30 04:18:35,605 p=53 u=root n=ansible |     53 1588220315.60551: trying /usr/local/lib/python3.6/site-packages/ansible/modules/__pycache__
2020-04-30 04:18:35,605 p=53 u=root n=ansible |     53 1588220315.60561: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/ipa
2020-04-30 04:18:35,605 p=53 u=root n=ansible |     53 1588220315.60592: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/cyberark
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60606: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/keycloak
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60622: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/opendj
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60634: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/__pycache__
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60646: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/ipa/__pycache__
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60669: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/cyberark/__pycache__
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60682: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/keycloak/__pycache__
2020-04-30 04:18:35,606 p=53 u=root n=ansible |     53 1588220315.60694: trying /usr/local/lib/python3.6/site-packages/ansible/modules/identity/opendj/__pycache__
2020-04-30 04:18:35,607 p=53 u=root n=ansible |     53 1588220315.60705: trying /usr/local/lib/python3.6/site-packages/ansible/modules/source_control/bitbucket
2020-04-30 04:18:35,607 p=53 u=root n=ansible |     53 1588220315.60721: trying /usr/local/lib/python3.6/site-packages/ansible/modules/source_control/__pycache__
2020-04-30 04:18:35,607 p=53 u=root n=ansible |     53 1588220315.60750: trying /usr/local/lib/python3.6/site-packages/ansible/modules/source_control/bitbucket/__pycache__
2020-04-30 04:18:35,607 p=53 u=root n=ansible |     53 1588220315.60764: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/manageiq
2020-04-30 04:18:35,607 p=53 u=root n=ansible |     53 1588220315.60788: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/ipmi
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60803: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/stacki
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60815: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/cobbler
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60829: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/cpm
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60846: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/intersight
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60863: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/foreman
2020-04-30 04:18:35,608 p=53 u=root n=ansible |     53 1588220315.60878: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/redfish
2020-04-30 04:18:35,609 p=53 u=root n=ansible |     53 1588220315.60901: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/dellemc
2020-04-30 04:18:35,609 p=53 u=root n=ansible |     53 1588220315.60915: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/oneview
2020-04-30 04:18:35,609 p=53 u=root n=ansible |     53 1588220315.60957: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/ucs
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.60998: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/imc
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61012: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/hpilo
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61029: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/lxca
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61044: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/__pycache__
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61057: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/manageiq/__pycache__
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61075: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/ipmi/__pycache__
2020-04-30 04:18:35,610 p=53 u=root n=ansible |     53 1588220315.61089: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/stacki/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61099: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/cobbler/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61111: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/cpm/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61126: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/intersight/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61138: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/foreman/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61150: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/redfish/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61166: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/dellemc/__pycache__
2020-04-30 04:18:35,611 p=53 u=root n=ansible |     53 1588220315.61180: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/oneview/__pycache__
2020-04-30 04:18:35,612 p=53 u=root n=ansible |     53 1588220315.61210: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/ucs/__pycache__
2020-04-30 04:18:35,612 p=53 u=root n=ansible |     53 1588220315.61237: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/imc/__pycache__
2020-04-30 04:18:35,612 p=53 u=root n=ansible |     53 1588220315.61248: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/hpilo/__pycache__
2020-04-30 04:18:35,612 p=53 u=root n=ansible |     53 1588220315.61261: trying /usr/local/lib/python3.6/site-packages/ansible/modules/remote_management/lxca/__pycache__
2020-04-30 04:18:35,612 p=53 u=root n=ansible |     53 1588220315.61274: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/netscaler
2020-04-30 04:18:35,613 p=53 u=root n=ansible |     53 1588220315.61303: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/avi
2020-04-30 04:18:35,614 p=53 u=root n=ansible |     53 1588220315.61411: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/vyos
2020-04-30 04:18:35,614 p=53 u=root n=ansible |     53 1588220315.61455: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/netact
2020-04-30 04:18:35,614 p=53 u=root n=ansible |     53 1588220315.61470: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/meraki
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61505: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/interface
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61522: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/aruba
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61536: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/routing
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61548: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/aireos
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61561: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/bigswitch
2020-04-30 04:18:35,615 p=53 u=root n=ansible |     53 1588220315.61580: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/aci
2020-04-30 04:18:35,617 p=53 u=root n=ansible |     53 1588220315.61729: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/panos
2020-04-30 04:18:35,617 p=53 u=root n=ansible |     53 1588220315.61773: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/cloudengine
2020-04-30 04:18:35,618 p=53 u=root n=ansible |     53 1588220315.61868: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/dellos6
2020-04-30 04:18:35,618 p=53 u=root n=ansible |     53 1588220315.61884: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/layer3
2020-04-30 04:18:35,619 p=53 u=root n=ansible |     53 1588220315.61909: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/junos
2020-04-30 04:18:35,619 p=53 u=root n=ansible |     53 1588220315.61959: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/eric_eccli
2020-04-30 04:18:35,619 p=53 u=root n=ansible |     53 1588220315.61973: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/nso
2020-04-30 04:18:35,619 p=53 u=root n=ansible |     53 1588220315.61991: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/f5
2020-04-30 04:18:35,622 p=53 u=root n=ansible |     53 1588220315.62219: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/skydive
2020-04-30 04:18:35,622 p=53 u=root n=ansible |     53 1588220315.62238: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/fortimanager
2020-04-30 04:18:35,622 p=53 u=root n=ansible |     53 1588220315.62286: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/check_point
2020-04-30 04:18:35,624 p=53 u=root n=ansible |     53 1588220315.62424: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/icx
2020-04-30 04:18:35,624 p=53 u=root n=ansible |     53 1588220315.62457: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/opx
2020-04-30 04:18:35,624 p=53 u=root n=ansible |     53 1588220315.62471: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/citrix
2020-04-30 04:18:35,624 p=53 u=root n=ansible |     53 1588220315.62483: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/fortios
2020-04-30 04:18:35,630 p=53 u=root n=ansible |     53 1588220315.63065: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/dellos9
2020-04-30 04:18:35,630 p=53 u=root n=ansible |     53 1588220315.63088: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/voss
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63104: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ordnance
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63119: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/nos
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63134: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ingate
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63147: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/frr
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63160: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/fortianalyzer
2020-04-30 04:18:35,631 p=53 u=root n=ansible |     53 1588220315.63174: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/cnos
2020-04-30 04:18:35,632 p=53 u=root n=ansible |     53 1588220315.63232: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/illumos
2020-04-30 04:18:35,632 p=53 u=root n=ansible |     53 1588220315.63260: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/enos
2020-04-30 04:18:35,632 p=53 u=root n=ansible |     53 1588220315.63277: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/protocol
2020-04-30 04:18:35,632 p=53 u=root n=ansible |     53 1588220315.63289: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/system
2020-04-30 04:18:35,633 p=53 u=root n=ansible |     53 1588220315.63306: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ftd
2020-04-30 04:18:35,633 p=53 u=root n=ansible |     53 1588220315.63323: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/cumulus
2020-04-30 04:18:35,633 p=53 u=root n=ansible |     53 1588220315.63344: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/onyx
2020-04-30 04:18:35,633 p=53 u=root n=ansible |     53 1588220315.63390: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/cloudvision
2020-04-30 04:18:35,634 p=53 u=root n=ansible |     53 1588220315.63403: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ironware
2020-04-30 04:18:35,634 p=53 u=root n=ansible |     53 1588220315.63419: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/eos
2020-04-30 04:18:35,634 p=53 u=root n=ansible |     53 1588220315.63462: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/nuage
2020-04-30 04:18:35,634 p=53 u=root n=ansible |     53 1588220315.63477: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/files
2020-04-30 04:18:35,634 p=53 u=root n=ansible |     53 1588220315.63490: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/edgeswitch
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63503: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/aos
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63528: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/routeros
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63542: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/cli
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63555: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/restconf
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63569: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/edgeos
2020-04-30 04:18:35,635 p=53 u=root n=ansible |     53 1588220315.63584: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/netvisor
2020-04-30 04:18:35,636 p=53 u=root n=ansible |     53 1588220315.63659: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/dellos10
2020-04-30 04:18:35,636 p=53 u=root n=ansible |     53 1588220315.63678: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ios
2020-04-30 04:18:35,637 p=53 u=root n=ansible |     53 1588220315.63725: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/asa
2020-04-30 04:18:35,637 p=53 u=root n=ansible |     53 1588220315.63742: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/ovs
2020-04-30 04:18:35,637 p=53 u=root n=ansible |     53 1588220315.63758: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/iosxr
2020-04-30 04:18:35,637 p=53 u=root n=ansible |     53 1588220315.63792: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/sros
2020-04-30 04:18:35,638 p=53 u=root n=ansible |     53 1588220315.63814: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/a10
2020-04-30 04:18:35,638 p=53 u=root n=ansible |     53 1588220315.63835: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/layer2
2020-04-30 04:18:35,638 p=53 u=root n=ansible |     53 1588220315.63852: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/netconf
2020-04-30 04:18:35,638 p=53 u=root n=ansible |     53 1588220315.63870: trying /usr/local/lib/python3.6/site-packages/ansible/modules/network/nxos
2020-04-30 04:18:35,640 p=53 u=root n=ansible |     53 1588220315.64074: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/callback
2020-04-30 04:18:35,645 p=53 u=root n=ansible |     53 1588220315.64550: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py
2020-04-30 04:18:35,654 p=53 u=root n=ansible |     53 1588220315.65406: Loaded config def from plugin (callback/default)
2020-04-30 04:18:35,654 p=53 u=root n=ansible |     53 1588220315.65421: Loading CallbackModule 'default' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
2020-04-30 04:18:35,654 p=53 u=root n=ansible | Loading callback plugin default of type stdout, v2.0 from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
2020-04-30 04:18:35,661 p=53 u=root n=ansible |     53 1588220315.66111: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,670 p=53 u=root n=ansible |     53 1588220315.67001: Loaded config def from plugin (callback/actionable)
2020-04-30 04:18:35,670 p=53 u=root n=ansible |     53 1588220315.67018: Loading CallbackModule 'actionable' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/actionable.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,672 p=53 u=root n=ansible |     53 1588220315.67205: Loading CallbackModule 'aws_resource_actions' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/aws_resource_actions.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,677 p=53 u=root n=ansible |     53 1588220315.67698: Loaded config def from plugin (callback/cgroup_memory_recap)
2020-04-30 04:18:35,677 p=53 u=root n=ansible |     53 1588220315.67711: Loading CallbackModule 'cgroup_memory_recap' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/cgroup_memory_recap.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,697 p=53 u=root n=ansible |     53 1588220315.69754: Loaded config def from plugin (callback/cgroup_perf_recap)
2020-04-30 04:18:35,697 p=53 u=root n=ansible |     53 1588220315.69772: Loading CallbackModule 'cgroup_perf_recap' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/cgroup_perf_recap.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,699 p=53 u=root n=ansible |     53 1588220315.69935: Loading CallbackModule 'context_demo' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/context_demo.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,701 p=53 u=root n=ansible |     53 1588220315.70160: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,712 p=53 u=root n=ansible |     53 1588220315.71193: Loaded config def from plugin (callback/counter_enabled)
2020-04-30 04:18:35,712 p=53 u=root n=ansible |     53 1588220315.71213: Loading CallbackModule 'counter_enabled' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/counter_enabled.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,714 p=53 u=root n=ansible |     53 1588220315.71412: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,723 p=53 u=root n=ansible |     53 1588220315.72311: Loaded config def from plugin (callback/debug)
2020-04-30 04:18:35,723 p=53 u=root n=ansible |     53 1588220315.72328: Loading CallbackModule 'debug' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/debug.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,723 p=53 u=root n=ansible |     53 1588220315.72338: Loading CallbackModule 'default' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/default.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,725 p=53 u=root n=ansible |     53 1588220315.72528: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,733 p=53 u=root n=ansible |     53 1588220315.73390: Loaded config def from plugin (callback/dense)
2020-04-30 04:18:35,734 p=53 u=root n=ansible |     53 1588220315.73403: Loading CallbackModule 'dense' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/dense.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,742 p=53 u=root n=ansible |     53 1588220315.74232: Loaded config def from plugin (callback/foreman)
2020-04-30 04:18:35,742 p=53 u=root n=ansible |     53 1588220315.74246: Loading CallbackModule 'foreman' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/foreman.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,745 p=53 u=root n=ansible |     53 1588220315.74494: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,753 p=53 u=root n=ansible |     53 1588220315.75377: Loaded config def from plugin (callback/full_skip)
2020-04-30 04:18:35,753 p=53 u=root n=ansible |     53 1588220315.75393: Loading CallbackModule 'full_skip' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/full_skip.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,765 p=53 u=root n=ansible |     53 1588220315.76571: Loaded config def from plugin (callback/grafana_annotations)
2020-04-30 04:18:35,765 p=53 u=root n=ansible |     53 1588220315.76589: Loading CallbackModule 'grafana_annotations' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/grafana_annotations.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,773 p=53 u=root n=ansible |     53 1588220315.77361: Loaded config def from plugin (callback/hipchat)
2020-04-30 04:18:35,773 p=53 u=root n=ansible |     53 1588220315.77381: Loading CallbackModule 'hipchat' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/hipchat.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,778 p=53 u=root n=ansible |     53 1588220315.77859: Loaded config def from plugin (callback/jabber)
2020-04-30 04:18:35,779 p=53 u=root n=ansible |     53 1588220315.77889: Loading CallbackModule 'jabber' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/jabber.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,782 p=53 u=root n=ansible |     53 1588220315.78221: Loaded config def from plugin (callback/json)
2020-04-30 04:18:35,782 p=53 u=root n=ansible |     53 1588220315.78235: Loading CallbackModule 'json' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/json.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,792 p=53 u=root n=ansible |     53 1588220315.79278: Loaded config def from plugin (callback/junit)
2020-04-30 04:18:35,792 p=53 u=root n=ansible |     53 1588220315.79296: Loading CallbackModule 'junit' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/junit.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,796 p=53 u=root n=ansible |     53 1588220315.79600: Loaded config def from plugin (callback/log_plays)
2020-04-30 04:18:35,796 p=53 u=root n=ansible |     53 1588220315.79614: Loading CallbackModule 'log_plays' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/log_plays.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,803 p=53 u=root n=ansible |     53 1588220315.80313: Loaded config def from plugin (callback/logdna)
2020-04-30 04:18:35,803 p=53 u=root n=ansible |     53 1588220315.80328: Loading CallbackModule 'logdna' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/logdna.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,813 p=53 u=root n=ansible |     53 1588220315.81334: Loaded config def from plugin (callback/logentries)
2020-04-30 04:18:35,813 p=53 u=root n=ansible |     53 1588220315.81349: Loading CallbackModule 'logentries' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/logentries.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,817 p=53 u=root n=ansible |     53 1588220315.81734: Loaded config def from plugin (callback/logstash)
2020-04-30 04:18:35,817 p=53 u=root n=ansible |     53 1588220315.81747: Loading CallbackModule 'logstash' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/logstash.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,843 p=53 u=root n=ansible |     53 1588220315.84363: Loaded config def from plugin (callback/mail)
2020-04-30 04:18:35,843 p=53 u=root n=ansible |     53 1588220315.84386: Loading CallbackModule 'mail' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/mail.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,845 p=53 u=root n=ansible |     53 1588220315.84522: Loading CallbackModule 'minimal' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/minimal.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,853 p=53 u=root n=ansible |     53 1588220315.85330: Loaded config def from plugin (callback/nrdp)
2020-04-30 04:18:35,853 p=53 u=root n=ansible |     53 1588220315.85345: Loading CallbackModule 'nrdp' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/nrdp.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,854 p=53 u=root n=ansible |     53 1588220315.85479: Loading CallbackModule 'null' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/null.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,856 p=53 u=root n=ansible |     53 1588220315.85602: Loading CallbackModule 'oneline' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/oneline.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,858 p=53 u=root n=ansible |     53 1588220315.85797: Loading CallbackModule 'osx_say' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/osx_say.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,859 p=53 u=root n=ansible |     53 1588220315.85941: Loading CallbackModule 'profile_roles' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/profile_roles.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,864 p=53 u=root n=ansible |     53 1588220315.86454: Loaded config def from plugin (callback/profile_tasks)
2020-04-30 04:18:35,864 p=53 u=root n=ansible |     53 1588220315.86468: Loading CallbackModule 'profile_tasks' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/profile_tasks.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,866 p=53 u=root n=ansible |     53 1588220315.86659: Loading CallbackModule 'say' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/say.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,870 p=53 u=root n=ansible |     53 1588220315.87031: Loaded config def from plugin (callback/selective)
2020-04-30 04:18:35,870 p=53 u=root n=ansible |     53 1588220315.87048: Loading CallbackModule 'selective' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/selective.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,872 p=53 u=root n=ansible |     53 1588220315.87282: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,881 p=53 u=root n=ansible |     53 1588220315.88141: Loaded config def from plugin (callback/skippy)
2020-04-30 04:18:35,881 p=53 u=root n=ansible |     53 1588220315.88155: Loading CallbackModule 'skippy' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/skippy.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,888 p=53 u=root n=ansible |     53 1588220315.88815: Loaded config def from plugin (callback/slack)
2020-04-30 04:18:35,888 p=53 u=root n=ansible |     53 1588220315.88829: Loading CallbackModule 'slack' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/slack.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,892 p=53 u=root n=ansible |     53 1588220315.89280: Loaded config def from plugin (callback/splunk)
2020-04-30 04:18:35,892 p=53 u=root n=ansible |     53 1588220315.89294: Loading CallbackModule 'splunk' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/splunk.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,895 p=53 u=root n=ansible |     53 1588220315.89574: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,904 p=53 u=root n=ansible |     53 1588220315.90470: Loaded config def from plugin (callback/stderr)
2020-04-30 04:18:35,904 p=53 u=root n=ansible |     53 1588220315.90486: Loading CallbackModule 'stderr' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/stderr.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,907 p=53 u=root n=ansible |     53 1588220315.90785: Loaded config def from plugin (callback/sumologic)
2020-04-30 04:18:35,908 p=53 u=root n=ansible |     53 1588220315.90798: Loading CallbackModule 'sumologic' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/sumologic.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,914 p=53 u=root n=ansible |     53 1588220315.91398: Loaded config def from plugin (callback/syslog_json)
2020-04-30 04:18:35,914 p=53 u=root n=ansible |     53 1588220315.91412: Loading CallbackModule 'syslog_json' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/syslog_json.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,915 p=53 u=root n=ansible |     53 1588220315.91556: Loading CallbackModule 'timer' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/timer.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,917 p=53 u=root n=ansible |     53 1588220315.91730: Loading CallbackModule 'tree' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/tree.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,919 p=53 u=root n=ansible |     53 1588220315.91912: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,927 p=53 u=root n=ansible |     53 1588220315.92773: Loaded config def from plugin (callback/unixy)
2020-04-30 04:18:35,927 p=53 u=root n=ansible |     53 1588220315.92788: Loading CallbackModule 'unixy' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/unixy.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,930 p=53 u=root n=ansible |     53 1588220315.93001: Loading ModuleDocFragment 'default_callback' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/default_callback.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,938 p=53 u=root n=ansible |     53 1588220315.93870: Loaded config def from plugin (callback/yaml)
2020-04-30 04:18:35,938 p=53 u=root n=ansible |     53 1588220315.93883: Loading CallbackModule 'yaml' from /usr/local/lib/python3.6/site-packages/ansible/plugins/callback/yaml.py (found_in_cache=False, class_only=True)
2020-04-30 04:18:35,938 p=53 u=root n=ansible | PLAYBOOK: test.yaml *****************************************************************************************************************************************
2020-04-30 04:18:35,939 p=53 u=root n=ansible | 1 plays in test.yaml
2020-04-30 04:18:35,939 p=53 u=root n=ansible |     53 1588220315.93932: in VariableManager get_vars()
2020-04-30 04:18:35,940 p=53 u=root n=ansible |     53 1588220315.94070: done with get_vars()
2020-04-30 04:18:35,940 p=53 u=root n=ansible |     53 1588220315.94089: in VariableManager get_vars()
2020-04-30 04:18:35,941 p=53 u=root n=ansible |     53 1588220315.94107: done with get_vars()
2020-04-30 04:18:35,955 p=53 u=root n=ansible |     53 1588220315.95575: Loading FilterModule 'core' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/core.py
2020-04-30 04:18:35,956 p=53 u=root n=ansible |     53 1588220315.95661: Loading FilterModule 'gcp_kms_filters' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/gcp_kms_filters.py
2020-04-30 04:18:35,957 p=53 u=root n=ansible |     53 1588220315.95722: Loading FilterModule 'ipaddr' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/ipaddr.py
2020-04-30 04:18:35,957 p=53 u=root n=ansible |     53 1588220315.95759: Loading FilterModule 'json_query' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/json_query.py
2020-04-30 04:18:35,958 p=53 u=root n=ansible |     53 1588220315.95798: Loading FilterModule 'k8s' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/k8s.py
2020-04-30 04:18:35,958 p=53 u=root n=ansible |     53 1588220315.95831: Loading FilterModule 'mathstuff' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/mathstuff.py
2020-04-30 04:18:35,959 p=53 u=root n=ansible |     53 1588220315.95894: Loading FilterModule 'network' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/network.py
2020-04-30 04:18:35,959 p=53 u=root n=ansible |     53 1588220315.95925: Loading FilterModule 'urls' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/urls.py
2020-04-30 04:18:35,959 p=53 u=root n=ansible |     53 1588220315.95952: Loading FilterModule 'urlsplit' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/urlsplit.py
2020-04-30 04:18:35,960 p=53 u=root n=ansible |     53 1588220315.96046: Loading TestModule 'core' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/core.py
2020-04-30 04:18:35,960 p=53 u=root n=ansible |     53 1588220315.96072: Loading TestModule 'files' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/files.py
2020-04-30 04:18:35,960 p=53 u=root n=ansible |     53 1588220315.96095: Loading TestModule 'mathstuff' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/mathstuff.py
2020-04-30 04:18:35,961 p=53 u=root n=ansible |     53 1588220315.96188: in VariableManager get_vars()
2020-04-30 04:18:35,962 p=53 u=root n=ansible |     53 1588220315.96220: done with get_vars()
2020-04-30 04:18:35,962 p=53 u=root n=ansible |     53 1588220315.96279: Loading FilterModule 'core' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/core.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,962 p=53 u=root n=ansible |     53 1588220315.96290: Loading FilterModule 'gcp_kms_filters' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/gcp_kms_filters.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96299: Loading FilterModule 'ipaddr' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/ipaddr.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96306: Loading FilterModule 'json_query' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/json_query.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96312: Loading FilterModule 'k8s' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/k8s.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96320: Loading FilterModule 'mathstuff' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/mathstuff.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96327: Loading FilterModule 'network' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/network.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96333: Loading FilterModule 'urls' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/urls.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96339: Loading FilterModule 'urlsplit' from /usr/local/lib/python3.6/site-packages/ansible/plugins/filter/urlsplit.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96369: Loading TestModule 'core' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/core.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96379: Loading TestModule 'files' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/files.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,963 p=53 u=root n=ansible |     53 1588220315.96386: Loading TestModule 'mathstuff' from /usr/local/lib/python3.6/site-packages/ansible/plugins/test/mathstuff.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,964 p=53 u=root n=ansible | PLAY [Uploading file: {{ image_file }}] *********************************************************************************************************************
2020-04-30 04:18:35,968 p=53 u=root n=ansible |     53 1588220315.96864: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/strategy
2020-04-30 04:18:35,969 p=53 u=root n=ansible |     53 1588220315.96914: Loading StrategyModule 'linear' from /usr/local/lib/python3.6/site-packages/ansible/plugins/strategy/linear.py
2020-04-30 04:18:35,969 p=53 u=root n=ansible |     53 1588220315.96962: getting the remaining hosts for this loop
2020-04-30 04:18:35,969 p=53 u=root n=ansible |     53 1588220315.96976: done getting the remaining hosts for this loop
2020-04-30 04:18:35,969 p=53 u=root n=ansible |     53 1588220315.96993: building list of next tasks for hosts
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97001: getting the next task for host tordevice.REDACTED
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97009: done getting next task for host tordevice.REDACTED
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97018:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97025:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97031: done building task lists
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97037: counting tasks in each state of execution
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97043: done counting tasks in each state of execution:
	num_setups: 0
	num_tasks: 1
	num_rescue: 0
	num_always: 0
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97050: advancing hosts in ITERATING_TASKS
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97056: starting to advance hosts
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97062: getting the next task for host tordevice.REDACTED
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97070: done getting next task for host tordevice.REDACTED
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97078:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97084:  ^ state is: HOST STATE: block=1, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:18:35,970 p=53 u=root n=ansible |     53 1588220315.97090: done advancing hosts to next task
2020-04-30 04:18:35,971 p=53 u=root n=ansible | META: ran handlers
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97111: done queuing things up, now waiting for results queue to drain
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97119: results queue empty
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97125: checking for any_errors_fatal
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97132: done checking for any_errors_fatal
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97138: checking for max_fail_percentage
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97143: done checking for max_fail_percentage
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97149: checking to see if all hosts have failed and the running result is not ok
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97154: done checking to see if all hosts have failed
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97159: getting the remaining hosts for this loop
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97165: done getting the remaining hosts for this loop
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97176: building list of next tasks for hosts
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97182: getting the next task for host tordevice.REDACTED
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97189: done getting next task for host tordevice.REDACTED
2020-04-30 04:18:35,971 p=53 u=root n=ansible |     53 1588220315.97196:  ^ task is: TASK: nxos_facts
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97203:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97209: done building task lists
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97214: counting tasks in each state of execution
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97221: done counting tasks in each state of execution:
	num_setups: 0
	num_tasks: 1
	num_rescue: 0
	num_always: 0
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97228: advancing hosts in ITERATING_TASKS
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97233: starting to advance hosts
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97239: getting the next task for host tordevice.REDACTED
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97245: done getting next task for host tordevice.REDACTED
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97252:  ^ task is: TASK: nxos_facts
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97259:  ^ state is: HOST STATE: block=2, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97266: done advancing hosts to next task
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97277: getting variables
2020-04-30 04:18:35,972 p=53 u=root n=ansible |     53 1588220315.97283: in VariableManager get_vars()
2020-04-30 04:18:35,973 p=53 u=root n=ansible |     53 1588220315.97301: Calling all_inventory to load vars for tordevice.REDACTED
2020-04-30 04:18:35,973 p=53 u=root n=ansible |     53 1588220315.97309: Calling groups_inventory to load vars for tordevice.REDACTED
2020-04-30 04:18:35,973 p=53 u=root n=ansible |     53 1588220315.97316: Calling all_plugins_inventory to load vars for tordevice.REDACTED
2020-04-30 04:18:35,973 p=53 u=root n=ansible |     53 1588220315.97394: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py
2020-04-30 04:18:35,974 p=53 u=root n=ansible |     53 1588220315.97411: Calling all_plugins_play to load vars for tordevice.REDACTED
2020-04-30 04:18:35,974 p=53 u=root n=ansible |     53 1588220315.97433: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,974 p=53 u=root n=ansible |     53 1588220315.97450: Calling groups_plugins_inventory to load vars for tordevice.REDACTED
2020-04-30 04:18:35,974 p=53 u=root n=ansible |     53 1588220315.97474: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,974 p=53 u=root n=ansible |     53 1588220315.97487: Calling groups_plugins_play to load vars for tordevice.REDACTED
2020-04-30 04:18:35,975 p=53 u=root n=ansible |     53 1588220315.97507: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,975 p=53 u=root n=ansible |     53 1588220315.97534: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,975 p=53 u=root n=ansible |     53 1588220315.97563: Loading VarsModule 'host_group_vars' from /usr/local/lib/python3.6/site-packages/ansible/plugins/vars/host_group_vars.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,977 p=53 u=root n=ansible |     53 1588220315.97760: done with get_vars()
2020-04-30 04:18:35,977 p=53 u=root n=ansible |     53 1588220315.97777: done getting variables
2020-04-30 04:18:35,977 p=53 u=root n=ansible |     53 1588220315.97788: sending task start callback, copying the task so we can template it temporarily
2020-04-30 04:18:35,977 p=53 u=root n=ansible |     53 1588220315.97795: done copying, going to template now
2020-04-30 04:18:35,978 p=53 u=root n=ansible |     53 1588220315.97802: done templating
2020-04-30 04:18:35,978 p=53 u=root n=ansible |     53 1588220315.97807: here goes the callback...
2020-04-30 04:18:35,978 p=53 u=root n=ansible | TASK [nxos_facts] *******************************************************************************************************************************************
2020-04-30 04:18:35,978 p=53 u=root n=ansible | task path: /root/test.yaml:20
2020-04-30 04:18:35,978 p=53 u=root n=ansible |     53 1588220315.97830: sending task start callback
2020-04-30 04:18:35,978 p=53 u=root n=ansible |     53 1588220315.97836: entering _queue_task() for tordevice.REDACTED/nxos_facts
2020-04-30 04:18:35,978 p=53 u=root n=ansible |     53 1588220315.97843: Creating lock for nxos_facts
2020-04-30 04:18:35,980 p=53 u=root n=ansible |     53 1588220315.98048: worker is 1 (out of 1 available)
2020-04-30 04:18:35,981 p=53 u=root n=ansible |     53 1588220315.98142: exiting _queue_task() for tordevice.REDACTED/nxos_facts
2020-04-30 04:18:35,982 p=53 u=root n=ansible |     53 1588220315.98214: done queuing things up, now waiting for results queue to drain
2020-04-30 04:18:35,982 p=59 u=root n=ansible |     59 1588220315.98184: running TaskExecutor() for tordevice.REDACTED/TASK: nxos_facts
2020-04-30 04:18:35,982 p=53 u=root n=ansible |     53 1588220315.98228: waiting for pending results...
2020-04-30 04:18:35,982 p=59 u=root n=ansible |     59 1588220315.98268: in run() - task 0242ac11-0002-bf5d-b365-000000000008
2020-04-30 04:18:35,983 p=59 u=root n=ansible |     59 1588220315.98328: calling self._execute()
2020-04-30 04:18:35,986 p=59 u=root n=ansible |     59 1588220315.98614: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection
2020-04-30 04:18:35,987 p=59 u=root n=ansible |     59 1588220315.98695: Loading Connection 'network_cli' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,987 p=59 u=root n=ansible |     59 1588220315.98728: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/shell
2020-04-30 04:18:35,987 p=59 u=root n=ansible |     59 1588220315.98751: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,987 p=59 u=root n=ansible |     59 1588220315.98765: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,987 p=59 u=root n=ansible |     59 1588220315.98791: Loading Connection 'local' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/local.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,988 p=59 u=root n=ansible |     59 1588220315.98807: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,988 p=59 u=root n=ansible |     59 1588220315.98816: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:35,988 p=59 u=root n=ansible |     59 1588220315.98836: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (found_in_cache=True, class_only=True)
2020-04-30 04:18:35,990 p=59 u=root n=ansible |     59 1588220315.99033: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal
2020-04-30 04:18:35,993 p=59 u=root n=ansible |     59 1588220315.99338: Loading TerminalModule 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/nxos.py
2020-04-30 04:18:35,995 p=59 u=root n=ansible |     59 1588220315.99504: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf
2020-04-30 04:18:35,998 p=59 u=root n=ansible |     59 1588220315.99839: Loading Cliconf 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/nxos.py
2020-04-30 04:18:35,998 p=59 u=root n=ansible | <tordevice.REDACTED> attempting to start connection
2020-04-30 04:18:35,998 p=59 u=root n=ansible | <tordevice.REDACTED> using connection plugin network_cli
2020-04-30 04:18:36,597 p=60 u=root n=ansible |     60 1588220316.59779: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__
2020-04-30 04:18:36,598 p=60 u=root n=ansible |     60 1588220316.59825: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection
2020-04-30 04:18:36,642 p=60 u=root n=ansible |     60 1588220316.64269: Loaded config def from plugin (connection/ssh)
2020-04-30 04:18:36,642 p=60 u=root n=ansible |     60 1588220316.64290: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=False, class_only=True)
2020-04-30 04:18:36,687 p=64 u=root n=ansible |     64 1588220316.68689: Loaded config def from plugin (connection/network_cli)
2020-04-30 04:18:36,687 p=64 u=root n=ansible |     64 1588220316.68743: Loading Connection 'network_cli' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__)
2020-04-30 04:18:36,687 p=64 u=root n=ansible |     64 1588220316.68794: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/shell
2020-04-30 04:18:36,690 p=64 u=root n=ansible |     64 1588220316.69034: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments
2020-04-30 04:18:36,692 p=64 u=root n=ansible |     64 1588220316.69213: Loading ModuleDocFragment 'shell_common' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_common.py
2020-04-30 04:18:36,699 p=64 u=root n=ansible |     64 1588220316.69987: Loaded config def from plugin (shell/sh)
2020-04-30 04:18:36,700 p=64 u=root n=ansible |     64 1588220316.69998: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py
2020-04-30 04:18:36,700 p=64 u=root n=ansible |     64 1588220316.70008: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,701 p=64 u=root n=ansible |     64 1588220316.70183: Loading Connection 'local' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/local.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__)
2020-04-30 04:18:36,701 p=64 u=root n=ansible |     64 1588220316.70196: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,702 p=64 u=root n=ansible |     64 1588220316.70204: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,702 p=64 u=root n=ansible |     64 1588220316.70215: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=True, class_only=True)
2020-04-30 04:18:36,704 p=64 u=root n=ansible |     64 1588220316.70452: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/__pycache__
2020-04-30 04:18:36,704 p=64 u=root n=ansible |     64 1588220316.70494: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal
2020-04-30 04:18:36,707 p=64 u=root n=ansible |     64 1588220316.70780: Loading TerminalModule 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/nxos.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/__pycache__:/usr/local/lib/python3.6/site-packages/ansible/plugins/terminal)
2020-04-30 04:18:36,710 p=64 u=root n=ansible |     64 1588220316.71008: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/__pycache__
2020-04-30 04:18:36,710 p=64 u=root n=ansible |     64 1588220316.71046: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf
2020-04-30 04:18:36,713 p=64 u=root n=ansible |     64 1588220316.71304: Loading Cliconf 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/nxos.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/__pycache__:/usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf)
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED> local domain socket does not exist, starting it
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED> control socket path is /root/.ansible/pc/951c79052a
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     60 1588220316.59779: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     60 1588220316.59825: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     60 1588220316.64269: Loaded config def from plugin (connection/ssh)
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     60 1588220316.64290: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=False, class_only=True)
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.68689: Loaded config def from plugin (connection/network_cli)
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.68743: Loading Connection 'network_cli' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__)
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.68794: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/shell
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.69034: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.69213: Loading ModuleDocFragment 'shell_common' from /usr/local/lib/python3.6/site-packages/ansible/plugins/doc_fragments/shell_common.py
2020-04-30 04:18:36,755 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.69987: Loaded config def from plugin (shell/sh)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.69998: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70008: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70183: Loading Connection 'local' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/local.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70196: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70204: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70215: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=True, class_only=True)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70452: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/__pycache__
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70494: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.70780: Loading TerminalModule 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/nxos.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/terminal/__pycache__:/usr/local/lib/python3.6/site-packages/ansible/plugins/terminal)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.71008: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/__pycache__
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.71046: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     64 1588220316.71304: Loading Cliconf 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/nxos.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/__pycache__:/usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf)
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED> local domain socket listeners started successfully
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED> loaded cliconf plugin nxos from path /usr/local/lib/python3.6/site-packages/ansible/plugins/cliconf/nxos.py for network_os nxos
2020-04-30 04:18:36,756 p=59 u=root n=ansible | network_os is set to nxos
2020-04-30 04:18:36,756 p=59 u=root n=ansible | <tordevice.REDACTED>     60 1588220316.59779: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__
    60 1588220316.59825: trying /usr/local/lib/python3.6/site-packages/ansible/plugins/connection
    60 1588220316.64269: Loaded config def from plugin (connection/ssh)
    60 1588220316.64290: Loading Connection 'ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__) (found_in_cache=False, class_only=True)

2020-04-30 04:18:36,757 p=59 u=root n=ansible | <tordevice.REDACTED> local domain socket path is /root/.ansible/pc/951c79052a
2020-04-30 04:18:36,761 p=59 u=root n=ansible |     59 1588220316.76106: Loading ActionModule 'nxos' from /usr/local/lib/python3.6/site-packages/ansible/plugins/action/nxos.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/action/__pycache__:/usr/local/lib/python3.6/site-packages/ansible/plugins/action)
2020-04-30 04:18:36,761 p=59 u=root n=ansible |     59 1588220316.76134: starting attempt loop
2020-04-30 04:18:36,761 p=59 u=root n=ansible |     59 1588220316.76143: running the handler
2020-04-30 04:18:36,782 p=64 u=root n=ansible |     64 1588220316.78256: Loaded config def from plugin (connection/paramiko_ssh)
2020-04-30 04:18:36,782 p=64 u=root n=ansible |     64 1588220316.78278: Loading Connection 'paramiko_ssh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/connection/paramiko_ssh.py (searched paths: /usr/local/lib/python3.6/site-packages/ansible/plugins/connection:/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__pycache__)
2020-04-30 04:18:36,782 p=64 u=root n=ansible |     64 1588220316.78289: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,783 p=64 u=root n=ansible |     64 1588220316.78298: Loading ShellModule 'sh' from /usr/local/lib/python3.6/site-packages/ansible/plugins/shell/sh.py (found_in_cache=True, class_only=False)
2020-04-30 04:18:36,783 p=64 u=root n=ansible | <tordevice.REDACTED> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: username_REDACTED on PORT 22 TO tordevice.REDACTED
2020-04-30 04:18:36,785 p=64 u=root n=ansible | <tordevice.REDACTED> CONFIGURE PROXY COMMAND FOR CONNECTION: ssh -W tordevice.REDACTED:22 -q username_REDACTED@BASTION_SERVER_REDACTED_IP
2020-04-30 04:18:36,786 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | starting thread (client mode): 0x8e9c44e0
2020-04-30 04:18:36,787 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-04-30 04:18:51,788 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Exception: Error reading SSH protocol banner
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2211, in _check_banner
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf = self.packetizer.readline(timeout)
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 380, in readline
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf += self._read_timeout(timeout)
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 622, in _read_timeout
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     raise socket.timeout()
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | socket.timeout
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | During handling of the above exception, another exception occurred:
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2039, in run
2020-04-30 04:18:51,789 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     self._check_banner()
2020-04-30 04:18:51,790 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2216, in _check_banner
2020-04-30 04:18:51,790 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     "Error reading SSH protocol banner" + str(e)
2020-04-30 04:18:51,790 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | paramiko.ssh_exception.SSHException: Error reading SSH protocol banner
2020-04-30 04:18:51,790 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:18:53,792 p=64 u=root n=ansible | <tordevice.REDACTED> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: username_REDACTED on PORT 22 TO tordevice.REDACTED
2020-04-30 04:18:53,795 p=64 u=root n=ansible | <tordevice.REDACTED> CONFIGURE PROXY COMMAND FOR CONNECTION: ssh -W tordevice.REDACTED:22 -q username_REDACTED@BASTION_SERVER_REDACTED_IP
2020-04-30 04:18:53,796 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | starting thread (client mode): 0x8e9c4c50
2020-04-30 04:18:53,796 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Exception: Error reading SSH protocol banner
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2211, in _check_banner
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf = self.packetizer.readline(timeout)
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 380, in readline
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf += self._read_timeout(timeout)
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 622, in _read_timeout
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     raise socket.timeout()
2020-04-30 04:19:08,798 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | socket.timeout
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | During handling of the above exception, another exception occurred:
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2039, in run
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     self._check_banner()
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2216, in _check_banner
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     "Error reading SSH protocol banner" + str(e)
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | paramiko.ssh_exception.SSHException: Error reading SSH protocol banner
2020-04-30 04:19:08,799 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:12,803 p=64 u=root n=ansible | <tordevice.REDACTED> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: username_REDACTED on PORT 22 TO tordevice.REDACTED
2020-04-30 04:19:12,806 p=64 u=root n=ansible | <tordevice.REDACTED> CONFIGURE PROXY COMMAND FOR CONNECTION: ssh -W tordevice.REDACTED:22 -q username_REDACTED@BASTION_SERVER_REDACTED_IP
2020-04-30 04:19:12,807 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | starting thread (client mode): 0x8e94bc50
2020-04-30 04:19:12,807 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Exception: Error reading SSH protocol banner
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2211, in _check_banner
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf = self.packetizer.readline(timeout)
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 380, in readline
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf += self._read_timeout(timeout)
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 622, in _read_timeout
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     raise socket.timeout()
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | socket.timeout
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:27,809 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | During handling of the above exception, another exception occurred:
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2039, in run
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     self._check_banner()
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2216, in _check_banner
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     "Error reading SSH protocol banner" + str(e)
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | paramiko.ssh_exception.SSHException: Error reading SSH protocol banner
2020-04-30 04:19:27,810 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:35,818 p=64 u=root n=ansible | <tordevice.REDACTED> ESTABLISH PARAMIKO SSH CONNECTION FOR USER: username_REDACTED on PORT 22 TO tordevice.REDACTED
2020-04-30 04:19:35,821 p=64 u=root n=ansible | <tordevice.REDACTED> CONFIGURE PROXY COMMAND FOR CONNECTION: ssh -W tordevice.REDACTED:22 -q username_REDACTED@BASTION_SERVER_REDACTED_IP
2020-04-30 04:19:35,822 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | starting thread (client mode): 0x8e912470
2020-04-30 04:19:35,822 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-04-30 04:19:50,824 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Exception: Error reading SSH protocol banner
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2211, in _check_banner
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf = self.packetizer.readline(timeout)
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 380, in readline
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     buf += self._read_timeout(timeout)
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 622, in _read_timeout
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     raise socket.timeout()
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | socket.timeout
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | During handling of the above exception, another exception occurred:
2020-04-30 04:19:50,825 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | Traceback (most recent call last):
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2039, in run
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     self._check_banner()
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |   File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2216, in _check_banner
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] |     "Error reading SSH protocol banner" + str(e)
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | paramiko.ssh_exception.SSHException: Error reading SSH protocol banner
2020-04-30 04:19:50,826 p=64 u=root n=p=64 u=root | paramiko [tordevice.REDACTED] | 
2020-04-30 04:19:50,827 p=64 u=root n=ansible | Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2211, in _check_banner
    buf = self.packetizer.readline(timeout)
  File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 380, in readline
    buf += self._read_timeout(timeout)
  File "/usr/local/lib/python3.6/site-packages/paramiko/packet.py", line 622, in _read_timeout
    raise socket.timeout()
socket.timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 352, in _connect_uncached
    **ssh_connect_kwargs
  File "/usr/local/lib/python3.6/site-packages/paramiko/client.py", line 406, in connect
    t.start_client(timeout=timeout)
  File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 660, in start_client
    raise e
  File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2039, in run
    self._check_banner()
  File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 2216, in _check_banner
    "Error reading SSH protocol banner" + str(e)
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py", line 421, in _connect
    ssh = self.paramiko_conn._connect()
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 245, in _connect
    self.ssh = SSH_CONNECTION_CACHE[cache_key] = self._connect_uncached()
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/paramiko_ssh.py", line 368, in _connect_uncached
    raise AnsibleConnectionFailure(msg)
ansible.errors.AnsibleConnectionFailure: Error reading SSH protocol banner

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ansible/utils/jsonrpc.py", line 45, in handle_request
    result = rpc_method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/__init__.py", line 34, in wrapped
    self._connect()
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/network_cli.py", line 426, in _connect
    raise AnsibleConnectionFailure(to_text(e, errors='surrogate_or_strict'))
ansible.errors.AnsibleConnectionFailure: Error reading SSH protocol banner

2020-04-30 04:19:50,827 p=64 u=root n=ansible | network_cli_retry: attempt: 1, caught exception(Error reading SSH protocol banner), pausing for 2 seconds
2020-04-30 04:19:50,827 p=64 u=root n=ansible | network_cli_retry: attempt: 2, caught exception(Error reading SSH protocol banner), pausing for 4 seconds
2020-04-30 04:19:50,827 p=64 u=root n=ansible | network_cli_retry: attempt: 3, caught exception(Error reading SSH protocol banner), pausing for 8 seconds
2020-04-30 04:19:50,829 p=59 u=root n=ansible |     59 1588220390.82909: done running TaskExecutor() for tordevice.REDACTED/TASK: nxos_facts [0242ac11-0002-bf5d-b365-000000000008]
2020-04-30 04:19:50,829 p=59 u=root n=ansible |     59 1588220390.82940: sending task result for task 0242ac11-0002-bf5d-b365-000000000008
2020-04-30 04:19:50,829 p=59 u=root n=ansible |     59 1588220390.82987: done sending task result for task 0242ac11-0002-bf5d-b365-000000000008
2020-04-30 04:19:50,830 p=59 u=root n=ansible |     59 1588220390.83008: WORKER PROCESS EXITING
2020-04-30 04:19:50,832 p=53 u=root n=ansible | The full traceback is:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 146, in run
    res = self._execute()
  File "/usr/local/lib/python3.6/site-packages/ansible/executor/task_executor.py", line 645, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/local/lib/python3.6/site-packages/ansible/plugins/action/nxos.py", line 137, in run
    out = conn.get_prompt()
  File "/usr/local/lib/python3.6/site-packages/ansible/module_utils/connection.py", line 185, in __rpc__
    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
ansible.module_utils.connection.ConnectionError: Error reading SSH protocol banner

2020-04-30 04:19:50,832 p=53 u=root n=ansible | fatal: [tordevice.REDACTED]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
2020-04-30 04:19:50,832 p=53 u=root n=ansible | ...ignoring
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83253: no more pending results, returning what we have
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83263: results queue empty
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83271: checking for any_errors_fatal
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83280: done checking for any_errors_fatal
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83287: checking for max_fail_percentage
2020-04-30 04:19:50,832 p=53 u=root n=ansible |     53 1588220390.83293: done checking for max_fail_percentage
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83299: checking to see if all hosts have failed and the running result is not ok
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83305: done checking to see if all hosts have failed
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83311: getting the remaining hosts for this loop
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83318: done getting the remaining hosts for this loop
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83329: building list of next tasks for hosts
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83336: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83344: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83351:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83359:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83366: done building task lists
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83373: counting tasks in each state of execution
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83380: done counting tasks in each state of execution:
	num_setups: 0
	num_tasks: 1
	num_rescue: 0
	num_always: 0
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83387: advancing hosts in ITERATING_TASKS
2020-04-30 04:19:50,833 p=53 u=root n=ansible |     53 1588220390.83393: starting to advance hosts
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83399: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83406: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83414:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83420:  ^ state is: HOST STATE: block=3, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83426: done advancing hosts to next task
2020-04-30 04:19:50,834 p=53 u=root n=ansible | META: ran handlers
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83459: done queuing things up, now waiting for results queue to drain
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83468: results queue empty
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83474: checking for any_errors_fatal
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83482: done checking for any_errors_fatal
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83487: checking for max_fail_percentage
2020-04-30 04:19:50,834 p=53 u=root n=ansible |     53 1588220390.83493: done checking for max_fail_percentage
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83499: checking to see if all hosts have failed and the running result is not ok
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83504: done checking to see if all hosts have failed
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83510: getting the remaining hosts for this loop
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83517: done getting the remaining hosts for this loop
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83526: building list of next tasks for hosts
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83533: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83540: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83546:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83553:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83560: done building task lists
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83565: counting tasks in each state of execution
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83575: done counting tasks in each state of execution:
	num_setups: 0
	num_tasks: 1
	num_rescue: 0
	num_always: 0
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83583: advancing hosts in ITERATING_TASKS
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83588: starting to advance hosts
2020-04-30 04:19:50,835 p=53 u=root n=ansible |     53 1588220390.83595: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83602: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83609:  ^ task is: TASK: meta (flush_handlers)
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83616:  ^ state is: HOST STATE: block=4, task=1, rescue=0, always=0, run_state=ITERATING_TASKS, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83622: done advancing hosts to next task
2020-04-30 04:19:50,836 p=53 u=root n=ansible | META: ran handlers
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83642: done queuing things up, now waiting for results queue to drain
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83649: results queue empty
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83654: checking for any_errors_fatal
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83661: done checking for any_errors_fatal
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83667: checking for max_fail_percentage
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83676: done checking for max_fail_percentage
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83682: checking to see if all hosts have failed and the running result is not ok
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83687: done checking to see if all hosts have failed
2020-04-30 04:19:50,836 p=53 u=root n=ansible |     53 1588220390.83693: getting the remaining hosts for this loop
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83699: done getting the remaining hosts for this loop
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83708: building list of next tasks for hosts
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83716: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83723: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83729:  ^ task is: None
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83735:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83742: done building task lists
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83748: counting tasks in each state of execution
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83755: done counting tasks in each state of execution:
	num_setups: 0
	num_tasks: 0
	num_rescue: 0
	num_always: 0
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83762: all hosts are done, so returning None's for all hosts
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83769: done queuing things up, now waiting for results queue to drain
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83775: results queue empty
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83781: checking for any_errors_fatal
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83786: done checking for any_errors_fatal
2020-04-30 04:19:50,837 p=53 u=root n=ansible |     53 1588220390.83792: checking for max_fail_percentage
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83797: done checking for max_fail_percentage
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83803: checking to see if all hosts have failed and the running result is not ok
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83809: done checking to see if all hosts have failed
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83816: getting the next task for host tordevice.REDACTED
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83823: done getting next task for host tordevice.REDACTED
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83828:  ^ task is: None
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83834:  ^ state is: HOST STATE: block=5, task=0, rescue=0, always=0, run_state=ITERATING_COMPLETE, fail_state=FAILED_NONE, pending_setup=False, tasks child state? (None), rescue child state? (None), always child state? (None), did rescue? False, did start at task? False
2020-04-30 04:19:50,838 p=53 u=root n=ansible |     53 1588220390.83841: running handlers
2020-04-30 04:19:50,839 p=53 u=root n=ansible | PLAY RECAP **************************************************************************************************************************************************
2020-04-30 04:19:50,839 p=53 u=root n=ansible | tordevice.REDACTED : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=1   
2020-04-30 04:19:50,839 p=53 u=root n=ansible |     53 1588220390.83948: RUNNING CLEANUP
2020-04-30 04:20:20,829 p=64 u=root n=ansible | persistent connection idle timeout triggered, timeout value is 30 secs.
See the timeout setting options in the Network Debug and Troubleshooting Guide.
2020-04-30 04:20:20,930 p=64 u=root n=ansible | shutdown complete

SSH Banner Error when Proxy command is used in args

From @telus-beep on Apr 23, 2020 13:00

ssh error

SUMMARY

[root@osboxes osboxes]# ansible-playbook check.yml -i host -u xxx -k
SSH password:

PLAY [Various Checks] ***********************************************************************

TASK [Checks IP Status] *********************************************************************
fatal: [R3]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Error reading SSH protocol banner"}

PLAY RECAP **********************************************************************************
R3 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

When running playbook from ansible controller with jump host to cisco device I get this error

ansible 2.9.6
python version =  3.6.8 

my host inventory

[root@osboxes osboxes]# cat host
[routers]
#R1
#R2
R3

[routers:vars]
ansible_connection= network_cli
ansible_network_os= ios
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q  [email protected]"'

my playbook

[root@osboxes osboxes]# cat check.yml 
---
- name: Various Checks
  hosts: routers
  gather_facts: false

  tasks: 
    - name: Checks INTERFACE Status
      cli_command:
        command: show ip int br
   

      register: result
    - debug: var=result.stdout_lines

Copied from original issue: ansible/ansible#69125

Allow SSH connection plugin when connecting to a network device

SUMMARY

When connecting to a network device, network_cli connection plugin uses paramiko_ssh:
We need to be able to bypass paramiko due to several old unsolved paramiko-based issues which do not depend on ansible such as:

My proposal is to allow ssh as a potential connection plugin to use the controller ssh client:

ansible_network_os: <some_network_os>
ansible_connection: ssh

This would be especially useful in environment where multiple SSH keys are used.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

network_cli

ANSIBLE VERSION
ansible 2.9.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/actionmystique/src/Ansible/git-yang-networkop/ansible-101/library']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Apr  1 2020, 15:52:55) [GCC 9.3.0]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis
CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 30
DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 180
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 200
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True
OS / ENVIRONMENT

controller:

  • ubuntu 20.04 focal
  • debian 11.0 bullseye

network devices: any

We can use the local ssh client to connect to the network devices, ansible should be able to do the same without paramiko:

ssh [email protected]
...
IOSv-15.7.3#

eos_lag_interfaces triggers TypeError error in module_utils/network/common/utils.py

SUMMARY

eos_lag_interfaces fails with error
ansible/module_utils/network/common/utils.py", line 96, in sort_list\nTypeError: '<' not supported between instances of 'dict' and 'dict'\n"

ISSUE TYPE
  • Bug Report
COMPONENT NAME

eos_lag_interfaces
module_utils/network/common/utils.py

ANSIBLE VERSION
ansible 2.9.10
  config file = /Users/X/Repos/N/ansible/v2/ansible.cfg
  configured module search path = ['/Users/X/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/X/n/lib/python3.7/site-packages/ansible
  executable location = /Users/X/n/bin/ansible
  python version = 3.7.8 (default, Jul  4 2020, 10:17:17) [Clang 11.0.3 (clang-1103.0.32.62)]
CONFIGURATION
ANSIBLE_NOCOWS(/Users/X/Repos/N/ansible/v2/ansible.cfg) = True
DEFAULT_FORKS(/Users/X/Repos/N/ansible/v2/ansible.cfg) = 10
DEFAULT_HOST_LIST(/Users/X/Repos/N/ansible/v2/ansible.cfg) = ['/Users/X/Repos/N/ansible/v2/inventories/numberly.py']
DEFAULT_MANAGED_STR(/Users/X/Repos/N/ansible/v2/ansible.cfg) = This file is managed by ansible, don't make changes here - they will be overwritten.
DEFAULT_ROLES_PATH(/Users/X/Repos/N/ansible/v2/ansible.cfg) = ['/Users/X/roles', '/Users/X/Repos/N/ansible/v2/roles']
DEFAULT_TIMEOUT(/Users/X/Repos/N/ansible/v2/ansible.cfg) = 30
DEPRECATION_WARNINGS(/Users/X/Repos/N/ansible/v2/ansible.cfg) = True
HOST_KEY_CHECKING(/Users/X/Repos/N/ansible/v2/ansible.cfg) = False
INVENTORY_ENABLED(/Users/X/Repos/N/ansible/v2/ansible.cfg) = ['host_list', 'script']
RETRY_FILES_ENABLED(/Users/X/Repos/N/ansible/v2/ansible.cfg) = False
SYSTEM_WARNINGS(/Users/X/Repos/N/ansible/v2/ansible.cfg) = True
OS / ENVIRONMENT

target is Arista switch running EOS 4.23.3M

STEPS TO REPRODUCE

Try to confifure a LAG using eos_lag_interfaces

ansible_connection: network_cli
ansible_network_os: eos

    - name: Configure uplink LAG
      eos_lag_interfaces:
        config:
          - name: "Port-Channel1"
            members:
              - member: "Ethernet49/1"
                mode: on
              - member: "Ethernet50/1"
                mode: on
        state: replaced
EXPECTED RESULTS

Should configure the lag on Arista switch

ACTUAL RESULTS

traceback error
TypeError: '<' not supported between instances of 'dict' and 'dict'

https://gist.github.com/cedrictabary/29450577d53eab946dcf97922a13d1b9

Logout function not being called from httpapi object context

SUMMARY

While developing an HttpApi plugin and instantiating HttpApiBase the logout function was never called.

According to the Ansible documentation the logout function, if implemented, will be called:

"Similarly, logout(self) can be implemented to call an endpoint to invalidate and/or release the current token, if such an endpoint exists. This will be automatically called when the connection is closed (and, by extension, when reset)."

From the code on line 280 the logout function is only being called from the connection object context.

The solution would be to check if "_netfwork_os" attribute is set, then it should called the "httpapi" object logout function as in:

if self._network_os:
    self.httpapi.logout()
ISSUE TYPE
  • Bug Report
COMPONENT NAME

httpapi.py connection plugin

ANSIBLE VERSION
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/leovilhena/.ansible/plugins/modu
les', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/leovilhena/.local/lib/python3.6/s
ite-packages/ansible
  executable location = /home/leovilhena/.local/bin/ansible
  python version = 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]
OS / ENVIRONMENT

Linux RHEL 8 and AWX

NAPALM connection plugin documentation

SUMMARY

Given the connection plugin for NAPALM as of Ansible 2.8, it would help if some clarity around how to use said connection plugin was documented.

For example, if the connection plugin was leveraged, what task would be used? I assume the napalm specific tasks, but how would a be structured given NAPALM is now being used as the connection method directly and leveraging the Ansible credentials.

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

napalm connection plugin
napalm.py

ANSIBLE VERSION

2.9.9

ioxr_config loop issue path not found

SUMMARY

when looping on ioxr_config using the until loop, it does not reuse the template, complains that the path to the file is not found.

This is supposed to loop through on the device until it is unlocked if it is temporarily locked by another user/task. Testing done while turning the lock on, while task runs and the releasing the lock.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

iosxr_config

ANSIBLE VERSION
ansible 2.9.6
  config file = /home/ssulliva/ansible.cfg
  configured module search path = [u'/home/ssulliva/.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
  python version = 2.7.5 (default, Sep 26 2019, 13:23:47) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
CONFIGURATION
Standard
OS / ENVIRONMENT

Tower 3.6.3 also tested cli with same version of ansible
Red Hat Enterprise Linux Server release 7.7 (Maipo)

STEPS TO REPRODUCE

use this template and commands to apply template to the router.

Template
{% for ntp in ntp_desired_state -%}
{{ ntp }}
{% endfor -%}
{% for no_ntp in ntp_to_delete -%}
no {{ no_ntp }}
{% endfor -%}

- name: Adjust NTP server
  iosxr_config:
    src: ../templates/ntp.j2
    comment: "Tower {{ tower_job_template_name }} Job {{ tower_job_id }}" # 60 caracter limitation on Cisco Side
    label: "Tower_JobID_{{ tower_job_id }}" # 30 caracter limitation on Cisco Side
  ignore_errors: yes
  register: ntp_adjust
  until: ntp_adjust is success
  retries: 10
  delay: 10
EXPECTED RESULTS

Slightly altered results, used lines instead of the config file. However expect similar results back when run

{
    "commands": [
        "ntp server vrf management 172.16.11.57"
    ],
    "_ansible_no_log": false,
    "changed": true,
    "attempts": 1,
    "invocation": {
        "module_args": {
            "comment": "Tower Basic Config on Tors Job 49239",
            "exclusive": false,
            "backup_options": null,
            "force": false,
            "after": null,
            "replace": "line",
            "host": null,
            "password": null,
            "port": null,
            "before": null,
            "src": null,
            "ssh_keyfile": null,
            "admin": false,
            "backup": false,
            "lines": [
                "ntp server vrf management 172.16.11.58",
                "ntp server vrf management 172.16.11.57",
                "\n"
            ],
            "label": "Tower_JobID_49239",
            "username": null,
            "parents": null,
            "timeout": null,
            "provider": null,
            "config": null,
            "match": "line"
        }
    },
    "diff": {
        "prepared": "Building configuration...\n!! IOS XR Configuration version = 6.3.2\n   ntp\n+   server vrf management 172.16.11.57\n   !\nend"
    }
}
ACTUAL RESULTS

Module cannot find path after first attempt
{
"retries": 4,
"attempts": 2,
"_ansible_no_log": false,
"msg": "path specified in src not found",
"changed": false
}

net_put not working in text mode

SUMMARY

net_put in text mode fails with error:

The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 147, in run
    res = self._execute()
  File "/usr/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 660, in _execute
    result = self._handler.run(task_vars=variables)
  File "/home/alexey/.ansible/collections/ansible_collections/ansible/netcommon/plugins/action/net_put.py", line 80, in run
    self._handle_template(convert_data=False)
AttributeError: 'ActionModule' object has no attribute '_handle_template'
fatal: [mikrotik-main]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}
ISSUE TYPE
  • Bug Report
COMPONENT NAME

net_put

ANSIBLE VERSION
ansible 2.9.11
  config file = None
  configured module search path = ['/home/alexey/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/lib/python-exec/python3.7/ansible
  python version = 3.7.8 (default, Jul  9 2020, 04:36:03) [GCC 9.2.0]
CONFIGURATION

OS / ENVIRONMENT

Host device is Gentoo Linux.
Target device is Mikrotik router with RouterOS 6.47

STEPS TO REPRODUCE
---
- hosts: mikrotik-main
  collections:
  - ansible.netcommon
  tasks:
    - name: mikrotik common/copy JSON parser
      ansible.netcommon.net_put:
        src: JParseFunctions.rsc
        protocol: sftp
        mode: text

Also need to create files/JParseFunctions.rsc.j2 with any contents

EXPECTED RESULTS

It should run template engine on JParseFunctions.rsc.j2 and upload result to mikrotik router

ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 147, in run
    res = self._execute()
  File "/usr/lib/python3.7/site-packages/ansible/executor/task_executor.py", line 660, in _execute
    result = self._handler.run(task_vars=variables)
  File "/home/alexey/.ansible/collections/ansible_collections/ansible/netcommon/plugins/action/net_put.py", line 80, in run
    self._handle_template(convert_data=False)
AttributeError: 'ActionModule' object has no attribute '_handle_template'
fatal: [mikrotik-main]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

https://gist.github.com/alesharik/28bef97f1108606732f552b82335ba8d

net_get & net_put functionality for devices without network_cli connection type

SUMMARY

net_get and net_put is great for pulling and pushing files to/from network devices that have a defined connection method. Unfortunately, there are a ton of fringe devices not as popular in the network space as they really can be defined as datacenter devices. These include PDUs, UPS, console servers, etc. It would be useful to have the same sort of functionality to load config files, backup config files, pull logs, and push firmware images.

This module would need to support protocols that include ftp, scp, sftp, and tftp.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • generic_get
  • generic_put
ADDITIONAL INFORMATION

It was recommended that I put this request here given an earlier inquiry in ansible core ansible/ansible#67681

rescue task for network_cli connection fails starting in Ansible 2.9.10 (still fails in Ansible 2.9.12)

As per the original issue, rolling back the network_cli.py changes from ansible/ansible#69642 fixed the issue.

SUMMARY

The below playbook works fine in Ansible 2.9.9 (and earlier), but started failing in Ansible 2.9.10 (and still fails in Ansible 2.9.12). In particular, the task in the block section is expected to fail and the rescue task is expected to work. As of Ansible 2.9.10, the rescue task continues to fail.

---
- name: Test block and rescue
  hosts: arista5
  gather_facts: False
  tasks:
    - block:
        - name: Attempt configuration using an invalid password
          vars:
            ansible_ssh_pass: "foobar"
          eos_config:
            lines:
              - "ip name-server {{ dns_server1 }}"
              - "ip name-server {{ dns_server2 }}"

      rescue:
        - name: Try configuration again in rescue-block
          vars:
            ansible_ssh_pass: my_password
          eos_config:
            lines:
              - "ip name-server {{ dns_server1 }}"
              - "ip name-server {{ dns_server2 }}"
ISSUE TYPE
  • Bug Report
COMPONENT NAME

network_cli connection inside of block-rescue

ANSIBLE VERSION

Failing version:

$ ansible --version
ansible 2.9.12
  config file = /home/ktbyers/.ansible.cfg
  configured module search path = ['/home/ktbyers/napalm-ansible/napalm_ansible/modules', '/home/ktbyers/ansible-extras/ntc-ansible/library']
  ansible python module location = /home/ktbyers/VENV/py3_venv/lib64/python3.7/site-packages/ansible
  executable location = /home/ktbyers/VENV/py3_venv/bin/ansible
  python version = 3.7.8 (default, Jul 24 2020, 20:26:49) [GCC 7.3.1 20180712 (Red Hat 7.3.1-9)]
CONFIGURATION
ACTION_WARNINGS(/home/ktbyers/.ansible.cfg) = False
DEFAULT_ACTION_PLUGIN_PATH(/home/ktbyers/.ansible.cfg) = ['/home/ktbyers/napalm-ansible/napalm_ansible/plugi
DEFAULT_FILTER_PLUGIN_PATH(/home/ktbyers/.ansible.cfg) = ['/home/ktbyers/ansible-extras/ntc-ansible/filter_p
DEFAULT_HOST_LIST(/home/ktbyers/.ansible.cfg) = ['/home/ktbyers/ansible-hosts.ini']
DEFAULT_MODULE_PATH(/home/ktbyers/.ansible.cfg) = ['/home/ktbyers/napalm-ansible/napalm_ansible/modules', '/
DEPRECATION_WARNINGS(/home/ktbyers/.ansible.cfg) = False
HOST_KEY_CHECKING(/home/ktbyers/.ansible.cfg) = False
PERSISTENT_COMMAND_TIMEOUT(/home/ktbyers/.ansible.cfg) = 40
RETRY_FILES_ENABLED(/home/ktbyers/.ansible.cfg) = False
EXPECTED RESULTS

I expected the rescue task to work as per the behavior in Ansible 2.9.9 and before.

ACTUAL RESULTS

Failing output (below with -vvvv and using Ansible 2.9.12)

$ ansible-playbook exercise2.yml -vvvv
ansible-playbook 2.9.12
  config file = /home/ktbyers/.ansible.cfg
  configured module search path = ['/home/ktbyers/napalm-ansible/napalm_ansible/modules', '/home/ktbyers/ansible-extras/ntc-ansible/library']
  ansible python module location = /home/ktbyers/VENV/py3_venv/lib64/python3.7/site-packages/ansible
  executable location = /home/ktbyers/VENV/py3_venv/bin/ansible-playbook
  python version = 3.7.8 (default, Jul 24 2020, 20:26:49) [GCC 7.3.1 20180712 (Red Hat 7.3.1-9)]
Using /home/ktbyers/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/ktbyers/ansible-hosts.ini as it did not pass its verify_file() method
script declined parsing /home/ktbyers/ansible-hosts.ini as it did not pass its verify_file() method
auto declined parsing /home/ktbyers/ansible-hosts.ini as it did not pass its verify_file() method
yaml declined parsing /home/ktbyers/ansible-hosts.ini as it did not pass its verify_file() method
Set default localhost to localhost
Parsed /home/ktbyers/ansible-hosts.ini inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /home/ktbyers/VENV/py3_venv/lib64/python3.7/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: exercise2.yml ************************************************************************************
Positional arguments: exercise2.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/home/ktbyers/ansible-hosts.ini',)
forks: 5
1 plays in exercise2.yml

PLAY [Test block and rescue] *******************************************************************************
META: ran handlers

TASK [Attempt configuration using an invalid password] *****************************************************
task path: /home/ktbyers/ansible_course/class7/exercises/exercise2/exercise2.yml:7
<arista5.lasthop.io> attempting to start connection
<arista5.lasthop.io> using connection plugin network_cli
<arista5.lasthop.io> local domain socket does not exist, starting it
<arista5.lasthop.io> control socket path is /home/ktbyers/.ansible/pc/173ec2aa62
<arista5.lasthop.io> local domain socket listeners started successfully
<arista5.lasthop.io> loaded cliconf plugin eos from path /home/ktbyers/VENV/py3_venv/lib/python3.7/site-packages/ansible/plugins/cliconf/eos.py for network_os eos
<arista5.lasthop.io> 
<arista5.lasthop.io> local domain socket path is /home/ktbyers/.ansible/pc/173ec2aa62
<arista5.lasthop.io> ESTABLISH LOCAL CONNECTION FOR USER: ktbyers
<arista5.lasthop.io> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb `"&& mkdir "` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634 `" && echo ansible-tmp-1598034716.4984322-31521-170479135808634="` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634 `" ) && sleep 0'
Using module file /home/ktbyers/VENV/py3_venv/lib64/python3.7/site-packages/ansible/modules/network/eos/eos_config.py
<arista5.lasthop.io> PUT /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/tmpwajb7rvz TO /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py
<arista5.lasthop.io> EXEC /bin/sh -c 'chmod u+x /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/ /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py && sleep 0'
<arista5.lasthop.io> EXEC /bin/sh -c '/home/ktbyers/VENV/ansible/bin/python /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py && sleep 0'
<arista5.lasthop.io> EXEC /bin/sh -c 'rm -f -r /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py", line 102, in <module>
    _ansiballz_main()
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.network.eos.eos_config', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.7/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py", line 518, in <module>
  File "/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py", line 397, in main
  File "/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/module_utils/network/eos/eos.py", line 107, in get_connection
  File "/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
ansible.module_utils.connection.ConnectionError: Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']
fatal: [arista5]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034716.4984322-31521-170479135808634/AnsiballZ_eos_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.network.eos.eos_config', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.7/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.7/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.7/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py\", line 518, in <module>\n  File \"/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py\", line 397, in main\n  File \"/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/module_utils/network/eos/eos.py\", line 107, in get_connection\n  File \"/tmp/ansible_eos_config_payload_rtle3fxe/ansible_eos_config_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

TASK [Try configuration again in rescue-block] *************************************************************
task path: /home/ktbyers/ansible_course/class7/exercises/exercise2/exercise2.yml:16
<arista5.lasthop.io> attempting to start connection
<arista5.lasthop.io> using connection plugin network_cli
<arista5.lasthop.io> found existing local domain socket, using it!
<arista5.lasthop.io> network_cli_retry: attempt: 1, caught exception(Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']), pausing for 2 seconds
<arista5.lasthop.io> network_cli_retry: attempt: 2, caught exception(Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']), pausing for 4 seconds
<arista5.lasthop.io> network_cli_retry: attempt: 3, caught exception(Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']), pausing for 8 seconds
<arista5.lasthop.io> updating play_context for connection
<arista5.lasthop.io> 
<arista5.lasthop.io> local domain socket path is /home/ktbyers/.ansible/pc/173ec2aa62
<arista5.lasthop.io> ESTABLISH LOCAL CONNECTION FOR USER: ktbyers
<arista5.lasthop.io> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb `"&& mkdir "` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584 `" && echo ansible-tmp-1598034735.59588-31615-28790253704584="` echo /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584 `" ) && sleep 0'
Using module file /home/ktbyers/VENV/py3_venv/lib64/python3.7/site-packages/ansible/modules/network/eos/eos_config.py
<arista5.lasthop.io> PUT /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/tmpnss8077h TO /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py
<arista5.lasthop.io> EXEC /bin/sh -c 'chmod u+x /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/ /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py && sleep 0'
<arista5.lasthop.io> EXEC /bin/sh -c '/home/ktbyers/VENV/ansible/bin/python /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py && sleep 0'
<arista5.lasthop.io> EXEC /bin/sh -c 'rm -f -r /home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py", line 102, in <module>
    _ansiballz_main()
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.network.eos.eos_config', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.7/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py", line 518, in <module>
  File "/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py", line 397, in main
  File "/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/module_utils/network/eos/eos.py", line 107, in get_connection
  File "/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
ansible.module_utils.connection.ConnectionError: Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']
fatal: [arista5]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/ktbyers/.ansible/tmp/ansible-local-31508i9l83shb/ansible-tmp-1598034735.59588-31615-28790253704584/AnsiballZ_eos_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.network.eos.eos_config', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.7/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.7/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.7/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py\", line 518, in <module>\n  File \"/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/modules/network/eos/eos_config.py\", line 397, in main\n  File \"/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/module_utils/network/eos/eos.py\", line 107, in get_connection\n  File \"/tmp/ansible_eos_config_payload_88yr221o/ansible_eos_config_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: Failed to authenticate: Bad authentication type; allowed types: ['publickey', 'keyboard-interactive']\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

PLAY RECAP *************************************************************************************************
arista5                    : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=1    ignored=0 

Module netconf_config not making changes when using `target: candidate`

SUMMARY

When using the netconf_config module to push a device configuration, Ansible does not make a change when we attempt to use the candidate datastore.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

netconf_config

ANSIBLE VERSION
config file = /home/ec2-user/git/ansible/ansible.cfg
  configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ec2-user/git/venv/ansible/lib64/python3.7/site-packages/ansible
  executable location = /home/ec2-user/git/venv/ansible/bin/ansible-playbook
  python version = 3.7.6 (default, Feb 26 2020, 20:54:15) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]
CONFIGURATION
DEFAULT_CALLBACK_WHITELIST(/home/ec2-user/git/ansible/ansible.cfg) = ['timer', 'profile_tasks', 'profile_roles']
DEFAULT_DEBUG(env: ANSIBLE_DEBUG) = True
DEFAULT_LOG_PATH(env: ANSIBLE_LOG_PATH) = /home/ec2-user/ansible-debug.log
DEFAULT_STRATEGY(/home/ec2-user/git/ansible/ansible.cfg) = free
OS / ENVIRONMENT

RHEL 8.1, Tower 3.7.1
Cisco IOS-XE 16.12.2-r

STEPS TO REPRODUCE

When using target: candidate, Ansible seems to place the file on the device datastore, but fails to commit the change. When making the same change directly to the netconf console and using the candidate datastore, the change is completed as expected.

- name: Configure interfaces via NETCONF OpenConfig YANG Model
  when: yang_model == 'oc'
  netconf_config:
    content: "{{ lookup('template', './oc_intf_l2.j2') }}"
    target: candidate
    timeout: 300
    commit: yes
    validate: no
EXPECTED RESULTS

We should see the device being changed.

ACTUAL RESULTS

No change is made on the device, yet the expected/changed output is displayed and Ansible reports a change has occurred.

ok=3    changed=1

Support for non-standard known_hosts file location

SUMMARY

Add the ability to specify an additional custom file to check for known_hosts, via a variable.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

network_cil

ADDITIONAL INFORMATION

Imagine I have Ansible working via a Jenkins agent, with everything specified in a Jenkinsfile, and a known_hosts file checked into source control. I don't want to worry about a bunch of state needing to pre-exist on the Jenkins agent(s), so being able to point Ansible to the custom known_hosts file checked into source control (and therefore dropped as part of the checkout in Jenkins) would be great.

netconf_get fails with '''known_hosts_lookup' is not defined"

SUMMARY

When using the netconf connection type, ansible tries to connect with SSH using the user's private key(s) even when ansible_private_key_file is set to another specific file.
No such issue when using the network_cli connection type alongside ansible_ssh_private_key_file.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

netconf

ANSIBLE VERSION
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis
CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 30
DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 180
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 200
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True
OS / ENVIRONMENT
controller host: Ubuntu focal 20.04
remote host: IOS-XEv 16.9.1
STEPS TO REPRODUCE
- name: Testing which private SSH key is used by network_cli connection
  hosts:
        - all
  vars:
        ansible_connection: network_cli
        ansible_network_os: ios
        ansible_ssh_private_key_file: "{{ private_key_file }}"
        ansible_user: "{{ username }}"
  tasks:
        - name: Getting all facts
          ios_facts:
                gather_subset: all
          
- name: Testing which private SSH key is used by netconf connection
  hosts:
        - all
  vars:
        ansible_connection: netconf
        ansible_network_os: ios
        ansible_private_key_file: "{{ private_key_file }}"
        ansible_user: "{{ username }}"
  tasks:
        - name: Getting running configuration and state data
          netconf_get:
EXPECTED RESULTS

Both plays should use the same SSH private key.

ACTUAL RESULTS
  1. The first play uses the correct SSH key matching private_key_file.
  2. The second play does not use the SSH key matching private_key_file and requests the password for another SSH private key (~/.ssh/id_rsa).

bug: ipaddr filter on empty list returns false instead of empty list

SUMMARY

Using the filter ipaddr('public') on an empty list returns false. It should return an empty list.

It correctly returns an empty list when used on a list with only private ips (e.g. ['192.168.1.0']|ipaddr('public') returns [])

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ipaddr filter

ANSIBLE VERSION
ansible 2.9.7
  config file = /home/yannik/projects/arge-docs/ansible/ansible.cfg
  configured module search path = ['/home/yannik/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.7 (default, Mar 13 2020, 10:23:39) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]

CONFIGURATION
ANSIBLE_NOCOWS(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = True
ANSIBLE_PIPELINING(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = True
DEFAULT_HOST_LIST(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = ['/home/yannik/projects/arge-docs/ansible/hosts']
DEFAULT_MANAGED_STR(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = This file is managed by ansible and will be overwritten! Do not change it manually!
DEFAULT_ROLES_PATH(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = ['/etc/ansible/vendor_roles', '/home/yannik/projects/arge-docs/ansible/vendor_roles']
RETRY_FILES_ENABLED(/home/yannik/projects/arge-docs/ansible/ansible.cfg) = False
OS / ENVIRONMENT

fedora 31 host, debian buster target

STEPS TO REPRODUCE
- debug: msg="{{ []|ipaddr('public') }}"  
EXPECTED RESULTS
TASK [my-role : debug] ********************************************************************************************************
ok: [my-host] => {
    "msg": []
}
ACTUAL RESULTS

Output:

TASK [my-role : debug] ********************************************************************************************************
ok: [my-host] => {
    "msg": false
}

When going from netconf_config to ansible.netcommon.netconf_config the module errors out.

SUMMARY

When going from netconf_config to ansible.netcommon.netconf_config the module errors out.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible.netcommon.netconf_config

ANSIBLE VERSION
ansible 2.9.11
  config file = /home/ec2-user/ansible-git-repo-np/ansible/ansible.cfg
  configured module search path = ['/home/ec2-user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ec2-user/venv/ansible/lib64/python3.6/site-packages/ansible
  executable location = /home/ec2-user/venv/ansible/bin/ansible
  python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]

CONFIGURATION
DEFAULT_STRATEGY(/home/ec2-user/ansible-git-repo-np/ansible/ansible.cfg) = free

OS / ENVIRONMENT

task is being run against IOS XE 16.12.02

STEPS TO REPRODUCE

replacing netconf_config with ansible.netcommon.netconf_config

- name: Configure interfaces via NETCONF Cisco YANG Model
   ansible.netcommon.netconf_config:
     content: "{{ lookup('template', './cisco_interfaces_l2.j2') }}"
     target: candidate
     timeout: 300
     commit: yes
     validate: no

EXPECTED RESULTS

Update the config on the cisco ios xe device

ACTUAL RESULTS

Get an error

            "host": null,
            "hostkey_verify": true,
            "lock": "always",
            "look_for_keys": true,
            "password": null,
            "port": 830,
            "save": false,
            "source_datastore": null,
            "src": null,
            "ssh_keyfile": null,
            "target": "candidate",
            "timeout": 300,
            "username": null,
            "validate": false
        }
    },
    "msg": "content value should have xml string with <config> tag as root"
}

LICENSE file is GPL-3.0+, however the netcommon does contain BSD and PSL licenses

SUMMARY

During review of netcommon collection in Fedora reviewer found one slight inconsistency with licensing.

plugins/module_utils/compat/ipaddress.py: Python Software Foundation License version 2
plugins/module_utils/network/common/config.py: BSD 2-clause "Simplified" License
plugins/module_utils/network/common/netconf.py: BSD 2-clause "Simplified" License
plugins/module_utils/network/common/network.py: BSD 2-clause "Simplified" License
plugins/module_utils/network/common/parsing.py: BSD 2-clause "Simplified" License
plugins/module_utils/network/common/utils.py: BSD 2-clause "Simplified" License
plugins/module_utils/network/restconf/restconf.py: BSD 2-clause "Simplified" License

I think you should append license texts of those files to the LICENSE file or relicense them under main license (GPL-3.0+).

ISSUE TYPE
  • Documentation Report
COMPONENT NAME
  • plugins/module_utils/compat/ipaddress.py
  • plugins/module_utils/network/common/config.py
  • plugins/module_utils/network/common/netconf.py`
  • plugins/module_utils/network/common/network.py`
  • plugins/module_utils/network/common/parsing.py`
  • plugins/module_utils/network/common/utils.py`
  • plugins/module_utils/network/restconf/restconf.py`
ANSIBLE VERSION
ansible 2.9.11
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/brain/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.0b5 (heads/master-dirty:c0e03cb, Jul 30 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]

Ansible vault not decrypted in httpapi after include_vars or set_fact

SUMMARY

While using httpapi with the collection fortinet.fortios (version 1.0.11) the modules will report quote_from_bytes() expected bytes if used after include_vars or set_fact, because the "password" option of httapi will contain the vault dict instead of the actual password when self.httpapi.login(self.get_option('remote_user'), self.get_option('password')) is called in lib\ansible\plugins\connection\httpapi.py:241

ISSUE TYPE
  • Bug Report
COMPONENT NAME

connection plugin -> httpapi

ANSIBLE VERSION
ansible 2.9.9.post0
  config file = None
  configured module search path = ['/home/mky/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/mky/ansible_devel/ansible/lib/ansible
  executable location = /home/mky/ansible_devel/ansible/bin/ansible
  python version = 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]
CONFIGURATION
$ ansible-config dump --only-changed
<none>
OS / ENVIRONMENT

Ubuntu in WSL

$ python --version
Python 3.6.8

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic
STEPS TO REPRODUCE

inventory

targets:
    hosts:
        testfw:
            ansible_host: "172.30.30.30"
            persistent_log_messages: "yes"
            ansible_password: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          36633363346231366462633433353430363030313033333234323961393935633636343933626663
          6333386536653362346632383364306431393937353063300a333636623634636336356639643465
          64376662396261656632396236636636656338643464363539646366326537343062303462613032
          3833353862393561300a373936376163386435316432646436646631323733633562356133346635
          3963

playbook

---
- name: "test"
  hosts: all
  gather_facts: False
  collections:
    - fortinet.fortios
  become: false
  connection: httpapi
  tasks:
    - set_fact:
        some_random_fact: true
    - name: "ensure virtual domain"
      fortios_system_vdom:
        vdom:  "global"
        system_vdom:
          state: "present"
          name: "root"
          short_name: "root"
EXPECTED RESULTS

If set_fact is obtained - the result is:

TASK [ensure virtual domain] 
ok: [cong-itffm-afw01]

Note: The same behavior can be seen if assert or include_vars is used

    - name: "check variables on asset"
      tags: always
      assert:
        that:
          - ansible_user is defined
          - ansible_httpapi_password is defined or ansible_password is defined
ACTUAL RESULTS
$ ANSIBLE_CONFIG=ansible.cfg ansible-playbook test.yml --vault-password-file  ~/test  -i inventory/inventory.yml -l testfw

fatal: [testfw]: FAILED! => changed=false
  ansible_facts:
    discovered_interpreter_python: /usr/bin/python
  module_stderr: |-
    Traceback (most recent call last):
      File "/home/mky/.ansible/tmp/ansible-local-242561mudj7lh/ansible-tmp-1591695232.2185314-24274-201421478678594/AnsiballZ_fortios_router_static.py", line 102, in <module>
        _ansiballz_main()
      File "/home/mky/.ansible/tmp/ansible-local-242561mudj7lh/ansible-tmp-1591695232.2185314-24274-201421478678594/AnsiballZ_fortios_router_static.py", line 94, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/home/mky/.ansible/tmp/ansible-local-242561mudj7lh/ansible-tmp-1591695232.2185314-24274-201421478678594/AnsiballZ_fortios_router_static.py", line 40, in invoke_module
        runpy.run_module(mod_name='ansible_collections.fortinet.fortios.plugins.modules.fortios_router_static', init_globals=None, run_name='__main__', alter_sys=True)
      File "/usr/lib/python3.6/runpy.py", line 205, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib/python3.6/runpy.py", line 96, in _run_module_code
        mod_name, mod_spec, pkg_name, script_name)
      File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py", line 487, in <module>
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py", line 455, in main
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py", line 382, in fortios_router
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/modules/fortios_router_static.py", line 365, in router_static
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/module_utils/fortios/fortios.py", line 173, in set
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/module_utils/fortios/fortios.py", line 146, in get_mkey
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/module_utils/fortios/fortios.py", line 137, in get_mkeyname
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible_collections/fortinet/fortios/plugins/module_utils/fortios/fortios.py", line 126, in schema
      File "/tmp/ansible_fortios_router_static_payload_4ojwxm5_/ansible_fortios_router_static_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
    ansible.module_utils.connection.ConnectionError: quote_from_bytes() expected bytes
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

net_ping recomments ping, but ping is not a substitute for net_ping

SUMMARY

The net_ping documentation recommends using ping if the target runs python (e.g. a linux box):
For targets running Python, use the ping module instead

But ping isn't a substitute for net_ping.

net_ping is used for checking connectivity from the target to another device on the network.
ping from network device to a remote destination.

ping is used for checking connectivity to the target. As the ping documentation says:
This is NOT ICMP ping

For what it's worth, it seems that the standard way of achieving a sort of ping-like behaviour is by using the wait_for module:

e.g.

    wait_for:
      host: 10.1.2.3
      port: 22
      delay: 5
      state: started
      timeout: 10

(*) https://docs.ansible.com/ansible/latest/modules/net_ping_module.html
(**) https://docs.ansible.com/ansible/latest/modules/ping_module.html

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

net_ping

ANSIBLE VERSION
ansible 2.9.10
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.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
  python version = 2.7.5 (default, Apr  2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-3

Potential bug with Ansible diff & check mode for network modules

SUMMARY

Looks like a potential bug with modules.

I was going thru this post (https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html & https://blog.networktocode.com/post/generating-diff-with-ansible/) where its mentioned that we can use check & diff mode together and Network Modules (ios_config, nxos_config, exos_config & eos_config) support check and diff mode.
I am trying to use that for gold config audit (audit pre decided config against what is present on device) for Cisco and Extreme devices. Below is my playbook –

ISSUE TYPE
  • Feature Request
COMPONENT NAME
  • eos_config
  • ios_config
  • nxos_config
ANSIBLE VERSION
2.9.9
CONFIGURATION
# task to audit & heal ntp configuration
- name: Set NTP template
  ios_config:
     src: "{{domain}}_{{ansible_network_os}}_ntp.cfg"
     match: line
  register: ntp_result

Below is my template (d_ios_ntp.cfg file) -
ntp server 10.19.70.1
ntp server 10.19.70.2

Device has config –
ntp server 10.19.70.1

Output -
"ntp_result": {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python"
        },
        "changed": true,
        "commands": [
            "configure ntp server add x.x.x.x"
        ],
        "failed": false,
        "updates": [
            "configure ntp server add x.x.x.x"
        ],
        "warnings": [
            "unable to perform diff against running-config due to check mode"
        ]
    }
OS / ENVIRONMENT

RHEL 7.8

STEPS TO REPRODUCE
EXPECTED RESULTS

Why there is a warning that unable to perform diff due to check mode. In documentation its clearly mentioned that it work together (potential bug).
Why diff is not working? In tutorials its highlighted that it works.

ACTUAL RESULTS

No diff returned. Warning was thrown that unable to perform diff due to check mode.

"ntp_result": {
        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python"
        },
        "changed": true,
        "commands": [
            "configure ntp server add x.x.x.x"
        ],
        "failed": false,
        "updates": [
            "configure ntp server add x.x.x.x"
        ],
        "warnings": [
            "unable to perform diff against running-config due to check mode"
        ]
    }

Running tests

SUMMARY

There is no documentation on how to run tests locally. I have tried:

  • tox -e venv pytest (problem with paths)
  • ansible-test units --tox (not a recognized argument)
  • ansible-test units (cannot use the venv)
  • tox -e venv ansible-test units (complain about HOME missing)

The documentation from Ansible does not seem to cover out-of-tree modules.

ISSUE TYPE
  • Documentation Report

Request to release new netcommon version since getting an error while running the collections with existing netcommon version

SUMMARY

getting an error when try to run the collections for our dellemc.os6 while using it with ansible.netcommon version 0.0.2.

Below is the error we receive while running the playbook:

The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 146, in run
res = self._execute()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 645, in _execute
result = self._handler.run(task_vars=variables)
File "/root/.ansible/collections/ansible_collections/dellemc/os9/plugins/action/os9.py", line 94, in run
result = super(ActionModule, self).run(task_vars=task_vars)
File "/root/.ansible/collections/ansible_collections/ansible/netcommon/plugins/action/network.py", line 43, in run
self._handle_src_option()
File "/root/.ansible/collections/ansible_collections/ansible/netcommon/plugins/action/network.py", line 186, in _handle_src_option
with self._templar.set_temporary_context(searchpath=searchpath):
AttributeError: 'Templar' object has no attribute 'set_temporary_context'
fatal: [leaf1]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""

The latest code for netcommon has some changes in ansible/netcommon/plugins/action/network.py file which is in version 0.0.3-dev19 onwards.
Since those changes are not there in existing netcommon i.e., 0.0.2, we are getting above error.

Playbook runs fine when i manually do the changes to the ansible/netcommon/plugins/action/network.py file which are there in 0.0.3-dev19 version.

Request you to release the new version of netcommon.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible/netcommon/plugins/action/network.py

ANSIBLE VERSION
The test was done in ansible 2.9.7 with ansible.netcommon version 0.0.2. 
Collections works fine with the ansible version 2.9.7 and ansible.netcommon  0.0.3-dev19 and onwards.

ipaddr('host/prefix') returns empty string when /255.255.255.255 netmask is present

SUMMARY

The filter ipaddr('host/prefix') just returns the empty string when the input contains a /255.255.255.255 netmask.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ipaddr

ANSIBLE VERSION
ansible 2.9.11
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/juser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.8 (default, Jul  1 2020, 15:39:07) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)]
CONFIGURATION

OS / ENVIRONMENT

Fedora 31, ansible-2.9.11-1.fc31.noarch

STEPS TO REPRODUCE
ansible -i localhost, all -m debug -a "msg={{ '203.0.113.23/255.255.255.0' | ipaddr('host/prefix') }}"
ansible -i localhost, all -m debug -a "msg={{ '203.0.113.23/255.255.255.255' | ipaddr('host/prefix') }}"
EXPECTED RESULTS
localhost | SUCCESS => {
    "msg": "203.0.113.23/24"
}
localhost | SUCCESS => {
    "msg": "203.0.113.23/32"
}
ACTUAL RESULTS
localhost | SUCCESS => {
    "msg": "203.0.113.23/24"
}
localhost | SUCCESS => {
    "msg": ""
}

Cannot switch from httpapi connection plugin to network_cli in the same workflow

SUMMARY

When an attempt is made to use ansible_connection: network_cli after having used ansible_connection: httpapi connection plugin with the same NXOS device in the same workflow, the latter is used instead.

This is a fatal issue with some networking modules - such as nxos_file_copy or net_put - which cannot be used with such httpapi connection plugin.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

httpapi

ANSIBLE VERSION
ansible 2.9.9
  config file = /etc/ansible/ansible.cfg
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.3 (default, May 14 2020, 22:08:57) [GCC 9.3.0]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis
CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit
DEFAULT_GATHER_TIMEOUT(/etc/ansible/ansible.cfg) = 30
DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = merge
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 180
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 200
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True
OS / ENVIRONMENT
controller host: Ubuntu focal 20.04
paramiko : 2.7.1

remote host: NX_OSv_9k 9.2.3
STEPS TO REPRODUCE
- name: Setting hostname on 9k
  vars:
        ansible_connection: httpapi
        ansible_httpapi_password: 'password'
        ansible_httpapi_port: 443
        ansible_httpapi_remote_user: admin
        ansible_httpapi_use_ssl: yes
        ansible_httpapi_validate_certs: no
        ansible_network_os: nxos
  nxos_config:
      replace: line
      save_when: modified
      lines:
        - "hostname {{ inventory_hostname }}"

- name: Pushing some file
  vars:
        ansible_become: yes
        ansible_become_method: enable
        ansible_become_password: 'password'
        ansible_connection: network_cli
        ansible_network_os: nxos
        ansible_password: 'password'
        ansible_user: admin
  nxos_file_copy:
        local_file: /some/file
EXPECTED RESULTS

Successful:

  • hostname change with ansible_connection: httpapi
  • file push with ansible_connection: network_cli
ACTUAL RESULTS
  • Successful hostname change with ansible_connection: httpapi
  • Failed file push with ansible_connection: network_cli
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/network/nxos/nxos_config.py
Pipelining is enabled.
<172.21.97.178> ESTABLISH LOCAL CONNECTION FOR USER: admin
<172.21.97.178> EXEC /bin/bash -c '/usr/bin/python3 && sleep 0'
ok: [NX_OSv_9k-9.2.3] => {
    "changed": false,
    "invocation": {
        "module_args": {
            "after": null,
            "auth_pass": null,
            "authorize": null,
            "backup": false,
            "backup_options": null,
            "before": null,
            "defaults": false,
            "diff_against": null,
            "diff_ignore_lines": null,
            "host": null,
            "intended_config": null,
            "lines": [
                "hostname NX_OSv_9k-9.2.3"
            ],
            "match": "line",
            "parents": null,
            "password": null,
            "port": null,
            "provider": null,
            "replace": "line",
            "replace_src": null,
            "running_config": null,
            "save_when": "modified",
            "src": null,
            "ssh_keyfile": null,
            "timeout": null,
            "transport": null,
            "use_ssl": null,
            "username": null,
            "validate_certs": null
        }
    }
}

<172.21.97.178> attempting to start connection
<172.21.97.178> using connection plugin httpapi
<172.21.97.178> found existing local domain socket, using it!
<172.21.97.178> updating play_context for connection
<172.21.97.178> 
<172.21.97.178> local domain socket path is home/user/.ansible/pc/daf7601ce6
fatal: [NX_OSv_9k-9.2.3]: FAILED! => {
    "changed": false,
    "msg": "Connection type must be fully qualified name for network_cli connection type, got httpapi"
}

Missing documentation for ipaddr functions

SUMMARY

It looks like there are several functions in the ipaddr filter function that are just not documented. One such example is cidr_lookup. It seems like it is intended to take an ipaddr var and check if it is in the subnet list provided.

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

ipaddr.py

ANSIBLE VERSION
ansible 2.9.9
  python version = 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]

merge cloud.common in ansible.netcommon?

The new vmware.vmware_rest collection relies on a component called ansible_module-turbo (https://github.com/goneri/ansible_module-turbo).
This shared library gives the ability to start a cache to speed up the module execution. The new cloud.common embeds this piece of code (https://github.com/ansible-collections/cloud.common). This is very useful for cases where the module execution is slowed down by large Python dependencies, or a slow session opening.
The feature may ultimately be merged in ansible/ansible, but for now we need to ship it through a collection.

I've started a new collection because this is rather specific to the cloud collections. But I may be wrong, and I don't want to create and maintain a myriad of new collections. Do you think it would make sense to merge the two collections, ideally before vmware_vmware_rest get released?

Usability netconf_config

I was recently using the netconf_config module, and spent a few hours diagnosing an issue with a simple payload.

The upshot was I was not enclosing my payload in <config>...</config>. This was giving me the following helpful error message.

"msg": "Element [{http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg}host-names] does not meet requirement"

Can I suggest that some better error handling is implemented to give a useful error message as to why the payload is not correct, and updating the documentation to make it clear that this is a requirement.

dave-bell-mac:prototype-ansible dave.bell$ ansible --version
ansible 2.9.9
  config file = /Users/dave.bell/git/prototype-ansible/ansible.cfg
  configured module search path = ['/Users/dave.bell/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/dave.bell/Library/Python/3.7/lib/python/site-packages/ansible
  executable location = /Users/dave.bell/Library/Python/3.7/bin/ansible
  python version = 3.7.7 (default, Mar 10 2020, 15:43:33) [Clang 11.0.0 (clang-1100.0.33.17)]

(FYI, I think there is supposed to be a template of information required for an issue, but that is missing...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.