Giter Club home page Giter Club logo

cisco_ios's Introduction

cisco_ios

This Ansible Network role provides a set of platform dependent fuctions that are designed to work with Cisco IOS network devices. The functions included int his role inlcuding both configuration and fact collection.

Requirements

  • Ansible 2.6 or later
  • Ansible Network Engine Role 2.6.0 or later

Functions

This section provides a list of the availabe functions that are including in this role. Any of the provided functions can be implemented in Ansible playbooks to perform automation activities on Cisco IOS devices.

Please see the documentation link for each function for details on how to use the function in an Ansible playbook.

Config Manager

Cloud VPN

License

GPLv3

Author Information

Ansible Network Community

cisco_ios's People

Contributors

colin-mccarthy avatar ez1mm avatar gdpak avatar justjais avatar jwoogee avatar lukedrussell avatar nilashishc avatar pabelanger avatar privateip avatar rcarrillocruz avatar softwarefactory-project-zuul[bot] avatar trishnaguha avatar wiggimt 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

Watchers

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

cisco_ios's Issues

get_facts can't pickle...

get_facts soft fails for certain hosts. I've not been able to figure out a pattern yet.

The playbook run just kinda stops one any affected hosts, without actually failing. Like it's in an infinite loop or something.

  - name: use ansible-network provider roles to gather facts
    include_role:
      name: "{{ ansible_network_provider }}"
      tasks_from: get_facts.yaml
    vars:
      subset: 
        - default
    when: ansible_network_os == 'ios'
TASK [ansible-network.cisco_ios : run command and parse output] **********************************************************************************************
Traceback (most recent call last):
  File "/home/4032956/.pyenv/versions/3.6.6/lib/python3.6/multiprocessing/queues.py", line 234, in _feed
    obj = _ForkingPickler.dumps(obj)
  File "/home/4032956/.pyenv/versions/3.6.6/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
TypeError: can't pickle StrictUndefined objects

show ip bgp sum should always be a list

with respect to: https://github.com/ansible-network/cisco_ios/blob/devel/parser_templates/cli/show_ip_bgp_summary.yaml

I feel like the output of show ip bgp summary should always be a list using the filter

here is my output

ok: [rtr2] => changed=false
  ansible_facts:
    cisco_ios:
      vrf:
        DEFAULT:
          protocols:
            bgp:
              neighbors:
                172.17.124.126:
                  asn: '65004'
                  ip_version: '4'
                  state_pfxrcd: '0'
                  timer: 04:31:33
              process_state: active
  included:
  - /home/student1/.ansible/roles/ansible-network.cisco_ios/parser_templates/cli/show_ip_bgp_summary.yaml

otherwise trying to print out the neighbor info for multiple vs one is different and you got to have logic in the playbook for that

yamllint Errors

Issue to track Yamlint issues in existing code. Probably they get introduced before we enabled lint check on Zuul.

./tasks/configure_user.yaml
5:9 error too many spaces after colon (colons)
35:1 error trailing spaces (trailing-spaces)

./tasks/cloud_vpn/providers/csr/initiator/add_host.yaml
19:1 error too many blank lines (1 > 0) (empty-lines)

./tasks/net_operations/pre_config_sink_device.yaml
4:7 error too many spaces before colon (colons)
21:42 error trailing spaces (trailing-spaces)

./tasks/net_operations/sink_packet_capture_logs.yaml
7:7 error too many spaces before colon (colons)
17:5 error wrong indentation: expected 6 but found 4 (indentation)
27:5 error wrong indentation: expected 6 but found 4 (indentation)
29:1 error too many blank lines (1 > 0) (empty-lines)

./tasks/net_operations/parse_validate_acl.yaml
10:7 error too many spaces before colon (colons)
12:7 error wrong indentation: expected 4 but found 6 (indentation)

./tests/config_manager/config_manager/tasks/load.yml
10:15 error too many spaces after colon (colons)
20:11 error too many spaces after colon (colons)
36:11 error too many spaces after colon (colons)
50:9 error trailing spaces (trailing-spaces)
53:15 error too many spaces after colon (colons

./tests/config_manager/config_manager/tasks/get.yml
4:11 error too many spaces after colon (colons)

./tests/parser_templates/cli/show_interfaces/main.yaml
1:1 error too many blank lines (1 > 0) (empty-lines)

./tests/parser_templates/cli/show_ip_vrf_detail/main.yaml
12:5 error wrong indentation: expected 6 but found 4 (indentation)

./includes/args_adapter.yaml
14:1 error too many blank lines (1 > 0) (empty-lines)

./includes/init.yaml
23:7 error wrong indentation: expected 4 but found 6 (indentation)
32:7 error wrong indentation: expected 4 but found 6 (indentation)
./parser_templates/config/show_run_interface.yaml
11:3 error wrong indentation: expected 4 but found 2 (indentation)
71:5 error wrong indentation: expected 6 but found 4 (indentation)

./parser_templates/net_operations/show_ip_access_list.yaml
33:231 error line too long (516 > 230 characters) (line-length)

./parser_templates/cli/show_lldp_neighbors_detail.yaml
54:1 error too many blank lines (2 > 0) (empty-lines)

./parser_templates/cli/show_ip_vrf_detail.yaml
139:1 error too many blank lines (1 > 0) (empty-lines)

./handlers/main.yml
2:46 error no new line character at the end of file (new-line-at-end-of-file)

"msg": "missing required arg: config_manager_text"

I'm getting this error when using the config_manager/load
I don't have that issue when using the config_manager/get?

Following the example of the task to load the config from here: https://github.com/ansible-network/cisco_ios/blob/devel/docs/config_manager/load.md

There is no mention of defining "config_manager_text" anywhere in the doc?

  - name: merge interface config to the switch
    include_role:
      name: ansible-network.cisco_ios
      tasks_from: config_manager/load
    vars:
      ios_config_file: "{{ config_file_location }}"

TASK [ansible-network.cisco_ios : initialize function] ***************************************************************************
included: /opt/src/role_interface_config-access/roles/ansible-network.cisco_ios/includes/init.yaml for my-lab-sw2.gw.me.ca

TASK [ansible-network.cisco_ios : set role basic facts] **************************************************************************
ok: [my-lab-sw2.gw.me.ca]

TASK [ansible-network.cisco_ios : display the role version to stdout] ************************************************************
ok: [my-lab-sw2.gw.me.ca] => {
    "msg": "ansible_network.cisco_ios version is v2.6.4"
}

TASK [ansible-network.cisco_ios : validate ansible_network_os == 'ios'] **********************************************************
skipping: [my-lab-sw2.gw.me.ca]

TASK [ansible-network.cisco_ios : validate ansible_connection == 'network_cli'] **************************************************
skipping: [my-lab-sw2.gw.me.ca]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles] ********************************
ok: [my-lab-sw2.gw.me.ca]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles from meta] **********************
skipping: [my-lab-sw2.gw.me.ca]

TASK [ansible-network.cisco_ios : validate config_manager_text is defined] *******************************************************
fatal: [my-lab-sw2.gw.me.ca]: FAILED! => {"changed": false, "msg": "missing required arg: config_manager_text"}

I looks like it coming in from "ansible-network.cisco_ios/tasks/config_manager/load.yaml"

<....>
- name: validate config_manager_text is defined
  fail:
    msg: "missing required arg: config_manager_text"
  when: config_manager_text is undefined

Using:
ansible-galaxy install -r requirements.yml

  • ansible-network.network-engine (v2.7.2) is already installed, skipping.
  • ansible-network.cisco_ios (stable-2.6) is already installed, skipping.

ansible --version
ansible 2.7.2
config file = /opt/src/role_interface_config-access/ansible.cfg
configured module search path = [u'/home/xxxxxx/.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 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

Error message when trying to run command_parser with v2.7.1

v2.7.1 gives an error message when trying to run the command_parser. It does work with v2.7.0.
It's reporting that network-engine is running the wrong version when it is not.

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles from meta] ****************************************************
fatal: [cisco_switch]: FAILED! => {"changed": false, "msg": "Error! : role: ansible-network.network-engine installed version :v2.7.2 is less than required version: v2.7.3"}

The installed version of network-engine is v2.7.3. Have also tried v2.7.5 with same exact error message.
cisco_ios v2.7.0 works with both network-engine v2.7.3 and v2.75.

Role: ansible-network.network-engine
        description: This role provides the foundation for building network roles by providing modules and plugins that are common to all Ansible Network roles.
        active: True
        commit: d9106df0c2a8531b90974a737d3a0ee67ef3e8e2
        commit_message: Merge pull request #231 from trishnaguha/v275changelog

v275 changelog

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
        commit_url: https://api.github.com/repos/ansible-network/network-engine/git/commits/d9106df0c2a8531b90974a737d3a0ee67ef3e8e2
        company: Red Hat
        created: 2018-04-23T13:20:20.814748Z
        dependencies: []
        download_count: 8236
        forks_count: 43
        galaxy_info:
                author: ansible-network
                company: Red Hat
                galaxy_tags: ['ansible', 'network', 'networking', 'engine', 'core', 'cli']
                issue_tracker_url: https://github.com/ansible-network/network-engine/issues
                license: GPLv3
                min_ansible_version: 2.7
                platforms: [{'name': 'network', 'versions': ['all']}]
        github_branch: HEAD
        github_repo: network-engine
        github_user: ansible-network
        id: 25206
        imported: 2019-03-05T10:54:39.640009-05:00
        install_date: Sat Mar 30 13:15:24 2019
        installed_version: v2.7.3
        is_valid: True
        issue_tracker_url: https://github.com/ansible-network/network-engine/issues
        license: GPLv3
        min_ansible_version: 2.7
        modified: 2019-03-05T15:54:39.710708Z
        open_issues_count: 8
        path: [u'/home/smitsi1/.ansible/roles', u'/usr/share/ansible/roles', u'/etc/ansible/roles']
        role_type: ANS
        stargazers_count: 75
        travis_status_url:

failing playbook:

    - name: Get show power inline
      ios_command:
        commands: "show power inline"
      register: result

    - name: import the network-engine role
      import_role:
        name: ansible-network.cisco_ios

    - name: Parse the results
      command_parser:
        file: "parsers/show_power_inline.yaml"
        content: "{{ result.stdout.0 }}"

facts uptime_split returns string instead of ints

The get facts task is returning strings instead of integers for the uptime_split key. To be able to use this data in tests it should be converted to integers.

As a workaround, use the jinja2 int filter in your playbooks.

Timeout error loading banner with config manager

Loading banner via config manager times out. Devices are Cisco CSRs running in AWS

---
- hosts: all
  gather_facts: no
  connection: network_cli
  vars:
    - ansible_command_timeout: 60
    - config_manager_replace: no
    - config_blocks:
        - banner_config

  tasks:
  - include_role:
      name: auto_config

  - debug:
      msg: "{{ configuration }}"

  - include_role:
      name: ansible-network.config_manager
      tasks_from: load
    vars:
      config_manager_text: "{{ configuration }}"
PLAY [all] *************************************************************************************************************************************************************************************************

TASK [include_role : auto_config] **************************************************************************************************************************************************************************

TASK [auto_config : create config] *************************************************************************************************************************************************************************
ok: [rtr1] => (item=banner_config)
ok: [rtr2] => (item=banner_config)

TASK [auto_config : store config] **************************************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [debug] ***********************************************************************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "banner exec #\nDevice Name: rtr1\nIP Address: 52.91.40.59\n\nThis device is managed by Ansible\n#\n!\n"
}
ok: [rtr2] => {
    "msg": "banner exec #\nDevice Name: rtr2\nIP Address: 52.91.176.178\n\nThis device is managed by Ansible\n#\n!\n"
}

TASK [include_role : ansible-network.config_manager] *******************************************************************************************************************************************************

TASK [ansible-network.config_manager : validate role spec] *************************************************************************************************************************************************
ok: [rtr2]
ok: [rtr1]

TASK [ansible-network.config_manager : create temp working directory] **************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : checkout scm project] ***********************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : discover the configuration file path and load it] *******************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : set the config_manager_file value based on config_manager_scm_file] *************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : remove temporary working dir] ***************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : load config file contents] ******************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : validate config_manager_text is defined] ****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [invoke network provider] *****************************************************************************************************************************************************************************

TASK [ansible-network.cisco_ios : initialize function] *****************************************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/init.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : set role basic facts] ****************************************************************************************************************************************************
ok: [rtr2]
ok: [rtr1]

TASK [ansible-network.cisco_ios : display the role version to stdout] **************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "ansible_network.cisco_ios version is v2.6.2"
}
ok: [rtr2] => {
    "msg": "ansible_network.cisco_ios version is v2.6.2"
}

TASK [ansible-network.cisco_ios : validate ansible_network_os == 'ios'] ************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : validate ansible_connection == 'network_cli'] ****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles] **********************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles from meta] ************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : validate config_manager_text is defined] *********************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : set ios checkpoint filename] *********************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : create checkpoint of current configuration] ******************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/checkpoint/create.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : validate ios_checkpoint_filename is defined] *****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : get current files on disk] ***********************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : remove old checkpoint file (if necessary)] *******************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : create a checkpoint of the current running-config] ***********************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : display message due to check mode] ***************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : replace current active configuration] ************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : merge with current active configuration] *********************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : load configuration using configure terminal] *****************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/configure/terminal.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : enter configuration mode] ************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : load configuration lines into target device] *****************************************************************************************************************************
fatal: [rtr1]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}
fatal: [rtr2]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}

TASK [ansible-network.cisco_ios : exit configuration mode] *************************************************************************************************************************************************
fatal: [rtr1]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}
fatal: [rtr2]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}

TASK [ansible-network.cisco_ios : display message] *********************************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "error configuring device, starting rollback"
}
ok: [rtr2] => {
    "msg": "error configuring device, starting rollback"
}

TASK [ansible-network.cisco_ios : initiate configuration rollback] *****************************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/checkpoint/restore.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : validate ios_checkpoint_filename is defined] *****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : get current files on disk] ***********************************************************************************************************************************************
fatal: [rtr1]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}
fatal: [rtr2]: FAILED! => {"msg": "command timeout triggered, timeout value is 60 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide."}

PLAY RECAP *************************************************************************************************************************************************************************************************
rtr1                       : ok=16   changed=0    unreachable=0    failed=3
rtr2                       : ok=16   changed=0    unreachable=0    failed=3

Unable to load filter_plugin inside tests

I m not able to load filter_plugins in tests without specifying filter plugin explicitly inside ansible.cfg.
https://github.com/Roshna-Raman/cisco_ios/tree/remotes/origin/f/parser_show_ip_route

$ ansible --version
ansible 2.7.5

Fail Log:
cisco_ios/tests/parser_templates/cli/show_ip_route_vrf_all/main.yaml:3
Wednesday 23 January 2019 22:16:09 +1000 (0:00:00.024) 0:00:00.062 *****
fatal: [localhost]: FAILED! =>
msg: 'template error while templating string: no filter named ''expand_routing_protocol_name''. String: {{ { nested_item.prefix+nested_item.mask: { ''subnet'': nested_item.prefix, ''mask'': nested_item.mask, ''protocol'': nested_item.prot | expand_routing_protocol_name, ''dist_metric'': nested_item.metric, ''next_hop'': ([nested_item.next_hop_nbr]+[nested_item.next_hop_int, nested_item.next_hop_int_sum]) | reject(''equalto'', '''') | list } } }}'
to retry, use: --limit @/home/4039467/work/cisco_ios/tests/test_parser_templates.retry

If I add 'filter_plugins = filter_plugins' in ansible.cfg, I get the expected result without any failures.
Please suggest if it is required to mention filter_plugins explicitly, as my understanding is that it should be taken care without the need to mention in ansible.cfg.

Please enable test_parser_templates.yaml as part of CI

As far as I can tell none of the parsers are being tested as part of CI. When I manually run the tests I am getting assert errors from parsers that have already been merged to devel. It's a bit painful to deal with.

I also suspect #91 will be observed when the parser tests are enabled.

Ansible 2.9 ios_command module not found when running "create a checkpoint of the current running-config"

{
    "exception": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"/usr/lib64/python2.7/runpy.py\", line 170, in run_module\n    mod_name, loader, code, fname = _get_module_details(mod_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 103, in _get_module_details\n    raise ImportError(\"No module named %s\" % mod_name)\nImportError: No module named ansible.modules.ios_command\n",
    "_ansible_no_log": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 102, in <module>\n  File \"<stdin>\", line 94, in _ansiballz_main\n  File \"<stdin>\", line 40, in invoke_module\n  File \"/usr/lib64/python2.7/runpy.py\", line 170, in run_module\n    mod_name, loader, code, fname = _get_module_details(mod_name)\n  File \"/usr/lib64/python2.7/runpy.py\", line 103, in _get_module_details\n    raise ImportError(\"No module named %s\" % mod_name)\nImportError: No module named ansible.modules.ios_command\n",
    "changed": false,
    "module_stdout": "",
    "rc": 1,
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"
}

So far everything works on Ansible 2.8.6, but this seems to break on Ansible 2.9. Has it something to do with collections? I can use the ios_command module fine when not using this provider role. I will be downloading this and making some modifications in order for it to work on 2.9.

Command error loading SNMP config

Error when trying to load SNMP config lines with config manager. Devices are Cisco CSR running in AWS

---
- hosts: all
  gather_facts: no
  connection: network_cli
  vars:
    - config_manager_replace: no
    - config_blocks:
        - snmp_config
 
  tasks:
  - include_role:
      name: auto_config

  - debug:
      msg: "{{ configuration }}"

  - include_role:
      name: ansible-network.config_manager
      tasks_from: load
    vars:  
      config_manager_text: "{{ configuration }}"
PLAY [all] *************************************************************************************************************************************************************************************************

TASK [include_role : auto_config] **************************************************************************************************************************************************************************

TASK [auto_config : create config] *************************************************************************************************************************************************************************
ok: [rtr1] => (item=snmp_config)
ok: [rtr2] => (item=snmp_config)

TASK [auto_config : store config] **************************************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [debug] ***********************************************************************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "snmp-server community ansible-public RO\nsnmp-server community ansible-private RW\n!\n"
}
ok: [rtr2] => {
    "msg": "snmp-server community ansible-public RO\nsnmp-server community ansible-private RW\n!\n"
}

TASK [include_role : ansible-network.config_manager] *******************************************************************************************************************************************************

TASK [ansible-network.config_manager : validate role spec] *************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.config_manager : create temp working directory] **************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : checkout scm project] ***********************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : discover the configuration file path and load it] *******************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : set the config_manager_file value based on config_manager_scm_file] *************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : remove temporary working dir] ***************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : load config file contents] ******************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.config_manager : validate config_manager_text is defined] ****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [invoke network provider] *****************************************************************************************************************************************************************************

TASK [ansible-network.cisco_ios : initialize function] *****************************************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/init.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : set role basic facts] ****************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : display the role version to stdout] **************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "ansible_network.cisco_ios version is v2.6.2"
}
ok: [rtr2] => {
    "msg": "ansible_network.cisco_ios version is v2.6.2"
}

TASK [ansible-network.cisco_ios : validate ansible_network_os == 'ios'] ************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : validate ansible_connection == 'network_cli'] ****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles] **********************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : Validate we have required installed version of dependent roles from meta] ************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : validate config_manager_text is defined] *********************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : set ios checkpoint filename] *********************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : create checkpoint of current configuration] ******************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/checkpoint/create.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : validate ios_checkpoint_filename is defined] *****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : get current files on disk] ***********************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : remove old checkpoint file (if necessary)] *******************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : create a checkpoint of the current running-config] ***********************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : display message due to check mode] ***************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : replace current active configuration] ************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : merge with current active configuration] *********************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : load configuration using configure terminal] *****************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/configure/terminal.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : enter configuration mode] ************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : load configuration lines into target device] *****************************************************************************************************************************
ok: [rtr1] => (item=snmp-server community ansible-public RO)
ok: [rtr2] => (item=snmp-server community ansible-public RO)
ok: [rtr1] => (item=snmp-server community ansible-private RW)
ok: [rtr1] => (item=!)
fatal: [rtr1]: FAILED! => {"msg": "missing required argument `command`"}
ok: [rtr2] => (item=snmp-server community ansible-private RW)
ok: [rtr2] => (item=!)
fatal: [rtr2]: FAILED! => {"msg": "missing required argument `command`"}

TASK [ansible-network.cisco_ios : exit configuration mode] *************************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : set host failed] *********************************************************************************************************************************************************
fatal: [rtr1]: FAILED! => {"changed": false, "msg": "error loading configuration lines"}
fatal: [rtr2]: FAILED! => {"changed": false, "msg": "error loading configuration lines"}

TASK [ansible-network.cisco_ios : display message] *********************************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "error configuring device, starting rollback"
}
ok: [rtr2] => {
    "msg": "error configuring device, starting rollback"
}

TASK [ansible-network.cisco_ios : initiate configuration rollback] *****************************************************************************************************************************************
included: /Users/wtome/Documents/customers/Marriott/network-poc/roles/ansible-network.cisco_ios/includes/checkpoint/restore.yaml for rtr1, rtr2

TASK [ansible-network.cisco_ios : validate ios_checkpoint_filename is defined] *****************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : get current files on disk] ***********************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : verify checkpoint file exists] *******************************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : checkpoint configuration restore pre hook] *******************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : restore checkpoint configuration] ****************************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : checkpoint configuration restore post hook] ******************************************************************************************************************************
skipping: [rtr1]
skipping: [rtr2]

TASK [ansible-network.cisco_ios : remove checkpoint file from remote device] *******************************************************************************************************************************
ok: [rtr1]
ok: [rtr2]

TASK [ansible-network.cisco_ios : display message] *********************************************************************************************************************************************************
ok: [rtr1] => {
    "msg": "successfully completed configuration rollback"
}
ok: [rtr2] => {
    "msg": "successfully completed configuration rollback"
}

TASK [ansible-network.cisco_ios : fail host due to config load error] **************************************************************************************************************************************
fatal: [rtr1]: FAILED! => {"changed": false, "msg": "error loading configuration onto target device"}
fatal: [rtr2]: FAILED! => {"changed": false, "msg": "error loading configuration onto target device"}

PLAY RECAP *************************************************************************************************************************************************************************************************
rtr1                       : ok=21   changed=0    unreachable=0    failed=3   
rtr2                       : ok=21   changed=0    unreachable=0    failed=3   

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.