Is the CISCO--- IOS_STATIC_ROUTE module working ok for you?

23 views
Skip to first unread message

MikeM

unread,
Sep 18, 2017, 8:37:38 PM9/18/17
to Ansible Project
Hi All,

Having major problems with this module. Can't get it to work + the Ansible Docs link appears incomplete on the main site.
ie..things like...no reference to using it. ie. "Provider"



##----ERRORS ----##
 
TASK [Configure Default Next Hop] *****************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named ipaddress
fatal: [10.99.4.118]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_KSy5yC/ansible_module_ios_static_route.py\", line 105, in <module>\n    from ipaddress import ip_network\nImportError: No module named ipaddress\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}



##-----PLAYBOOK USED-----##

###################################################################################################
Config used-- all Inventory files, group_vars, vault etc. working fine with other - IOS playbooks - ie ios_config, ios_command
###################################################################################################

---
- hosts: labkit
  gather_facts: no
  connection: local

  tasks:

  - name: define provider
    set_fact:
      provider:
        host: "{{ inventory_hostname }}"
        username: "{{ ansible_user }}"
        password: "{{ ansible_ssh_pass }}"
        authorize: yes
        auth_pass: "{{ ansible_ssh_pass }}"
        timeout: 30

#------------------------------------------------------

  - name: Configure Test Route
    ios_static_route:
      provider: "{{ provider }}"
      prefix: 8.8.8.0
      mask: 255.255.255.0
      next_hop: "{{exit_int}}"









Ganesh Nalawade

unread,
Sep 19, 2017, 1:06:21 AM9/19/17
to ansible...@googlegroups.com

It seems Python `ipaddress`  library required for `ios_static_module` is not installed in your environment. 
Can you please install it and retry.

Also, I think the error message should be properly handled in `ios_static_module` in case of prerequisite library is not
installed.

Can you please raise an issue here https://github.com/ansible/ansible/issues with required details.

Regards,
Ganesh


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/987b994a-f0c3-4303-a817-0a2c0f927ea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages