# Getting error in using register module

**URL:** <https://forum.ansible.com/t/getting-error-in-using-register-module/29708>\
**Category:** Ansible Project\
**Created:** [February 19, 2019, 4:54pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708 "2019-02-19T16:54:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajal\_tiwari](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sajal_tiwari/32/2755_2.png) [@sajal\_tiwari](https://forum.ansible.com/u/sajal_tiwari)\
**Post date:** [February 19, 2019, 4:54pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708/1 "2019-02-19T16:54:26Z")

</div>

Hello,  
I am getting below error while using register module with network modules(ios\_command & nxos\_command).  
Can someone help on the issue.

ERROR! Module “register” shadows the name of a reserved keyword. Please rename or remove this module. Found at /opt/rh/python27/root/usr/lib/python2.7/site-packages/setuptools/command/register.py

---

<div class="post-metadata">

**Author:** ![Karthik\_Chandrasheka](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Karthik\_Chandrasheka](https://forum.ansible.com/u/Karthik_Chandrasheka)\
**Post date:** [February 19, 2019, 4:59pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708/2 "2019-02-19T16:59:21Z")

</div>

If you could show your code that would be much better to understand.

---

<div class="post-metadata">

**Author:** ![sajal\_tiwari](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sajal_tiwari/32/2755_2.png) [@sajal\_tiwari](https://forum.ansible.com/u/sajal_tiwari)\
**Post date:** [February 19, 2019, 5:03pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708/3 "2019-02-19T17:03:33Z")

</div>

The script being used.

# For Cisco Devices

- hosts: Cisco\_SW  
gather\_facts: true  
connection: local

tasks:

- name: show run  
ios\_command:  
commands:

- show run  
host: “{{ ansible\_host }}”  
username: “{{ un }}”  
password: “{{ pwd }}”  
register: config

- name: save output to /etc/ansible/backups  
copy:  
content: “{{ config.stdout[0] }}”  
dest: “/etc/ansible/backups/show\_run\_{{ inventory\_hostname }}\_{{ansible\_date\_time.date}}.txt”

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [February 19, 2019, 5:07pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708/4 "2019-02-19T17:07:07Z")

</div>

The problem for whatever reason, is that ansible has been instructed to look in /opt/rh/python27/root/usr/lib/python2.7/site-packages/setuptools/command/ for ansible modules.

It located a file named register.py in that directory, and it is causing issues with ansible.

You may have some misconfiguration that is causing this, and using `ansible-config dump --only-changed` may reveal the issue.

---

<div class="post-metadata">

**Author:** ![sajal\_tiwari](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sajal_tiwari/32/2755_2.png) [@sajal\_tiwari](https://forum.ansible.com/u/sajal_tiwari)\
**Post date:** [February 19, 2019, 6:18pm UTC](https://forum.ansible.com/t/getting-error-in-using-register-module/29708/5 "2019-02-19T18:18:53Z")

</div>

Below is the output from the command.

DEFAULT\_MODULE\_PATH(/etc/ansible/ansible.cfg) = [u’/usr/share/my\_modules’, u’/opt/rh/python27/root/usr/lib/python2.7/site-packages/icontrol’, u’/usr/lib/python2.7/site-packages/ansible/utils/module\_docs\_fragments’]

DEFAULT\_ROLES\_PATH(/etc/ansible/ansible.cfg) = [u’/etc/ansible/roles’, u’/usr/share/ansible/roles’]  
PARAMIKO\_HOST\_KEY\_AUTO\_ADD(/etc/ansible/ansible.cfg) = True
