# import error: No module named plugins.action.normal

**URL:** <https://forum.ansible.com/t/import-error-no-module-named-plugins-action-normal/29221>\
**Category:** Ansible Project\
**Tags:** ubuntu, galaxy-ng\
**Created:** [December 7, 2018, 11:03pm UTC](https://forum.ansible.com/t/import-error-no-module-named-plugins-action-normal/29221 "2018-12-07T23:03:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnaughton](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jnaughton](https://forum.ansible.com/u/jnaughton)\
**Post date:** [December 7, 2018, 11:03pm UTC](https://forum.ansible.com/t/import-error-no-module-named-plugins-action-normal/29221/1 "2018-12-07T23:03:45Z")

</div>

Hi All,

When we attempt to use Ansible on a bare metal server running centos 6.5, single python2.7 the “juniper\_junos\_config:” module gives us this error “import error: No module named plugins.action.normal”. This works fine on another Ubuntu server. I hope someone here may have some thoughts on what is wrong.

p-mon01{jnaughton}~/network-ansible/ansible [1038] $ ansible-playbook -i hosts-lab playbooks/lab-push.pb.yaml -vvv  
ansible-playbook 2.7.0  
config file = /home/jnaughton/network-ansible/ansible/ansible.cfg  
configured module search path = [u’/home/jnaughton/network-ansible/ansible/modules’]  
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-playbook  
python version = 2.7.14 (default, Oct 19 2018, 14:48:27) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]  
Using /home/jnaughton/network-ansible/ansible/ansible.cfg as config file  
Parsed /home/jnaughton/network-ansible/ansible/hosts-lab inventory source with ini plugin

PLAYBOOK: lab-push.pb.yaml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in playbooks/lab-push.pb.yaml  
Username: labtech  
Password:

PLAY [Load and generate a configuration and push to a device running Junos OS] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
META: ran handlers

TASK [load configure file into device] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/jnaughton/network-ansible/ansible/playbooks/lab-push.pb.yaml:24  
\<10.95.7.5\> ESTABLISH LOCAL CONNECTION FOR USER: jnaughton  
\<10.95.7.5\> EXEC /bin/sh -c ‘echo ~jnaughton && sleep 0’  
\<10.95.7.5\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379`” && echo ansible-tmp-1543333736.61-164598744816379=“`echo /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379`” ) && sleep 0’  
Using module file /home/jnaughton/.ansible/roles/Juniper.Junos/library/juniper\_junos\_config.py  
\<10.95.7.5\> PUT /home/jnaughton/.ansible/tmp/ansible-local-229118drPfu/tmpjeSXDq TO /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py  
\<10.95.7.5\> EXEC /bin/sh -c ‘chmod u+x /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/ /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py && sleep 0’  
\<10.95.7.5\> EXEC /bin/sh -c ‘/usr/bin/python /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py && sleep 0’  
\<10.95.7.5\> EXEC /bin/sh -c ‘rm -f -r /home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/ \> /dev/null 2\>&1 && sleep 0’  
The full traceback is:  
Traceback (most recent call last):  
File “/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py”, line 113, in   
\_ansiballz\_main()  
File “/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py”, line 105, in \_ansiballz\_main  
invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)  
File “/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py”, line 48, in invoke\_module  
imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)  
File “/tmp/ansible\_juniper\_junos\_config\_payload\_rUnJEK/ **main**.py”, line 741, in   
File “/tmp/ansible\_juniper\_junos\_config\_payload\_rUnJEK/ansible\_juniper\_junos\_config\_payload.zip/ansible/module\_utils/juniper\_j nos\_common.py”, line 40, in   
ImportError: No module named plugins.action.normal  
fatal: [10.95.7.5]: FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “Traceback (most recent call last):\n File "/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py", line 113, in \n \_ansiballz\_main()\n File "/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py", line 105, in \_ansiballz\_main\n invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)\n File "/home/jnaughton/.ansible/tmp/ansible-tmp-1543333736.61-164598744816379/AnsiballZ\_juniper\_junos\_config.py", line 48, in invoke\_module\n imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)\n File "/tmp/ansible\_juniper\_junos\_config\_payload\_rUnJEK/ **main**.py", line 741, in \n File "/tmp/ansible\_juniper\_junos\_config\_payload\_rUnJEK/ansible\_juniper\_junos\_config\_payload.zip/ansible/module\_utils/juniper\_junos\_comm on.py", line 40, in \nImportError: No module named plugins.action.normal\n”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 1  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.95.7.5 : ok=0 changed=0 unreachable=0 failed=1

The Juniper.Junos role is installed:

p-mon01{jnaughton}~/network-ansible/ansible [1039] $ ansible-galaxy list

- Juniper.Junos, 2.1.0  
p-mon01{jnaughton}~/network-ansible/ansible [1040] $ ansible-galaxy Juniper.Junos info

Role: Juniper.Junos  
description: Network build automation of Junos devices.  
active: True  
commit: 019573cc435cd7c8c6eb54cce286cce1209d7b91  
commit\_message: Merge pull request #372 from rsmekala/master

Prepare the 2.1.0 release  
commit\_url: [https://github.com/Juniper/ansible-junos-stdlib/commit/019573cc435cd7c8c6eb54cce286cce1209d7b91](https://github.com/Juniper/ansible-junos-stdlib/commit/019573cc435cd7c8c6eb54cce286cce1209d7b91)  
company: Juniper Networks, Inc.  
created: 2016-02-26T11:54:40.759806Z  
dependencies:   
download\_count: 61453  
forks\_count: 117  
galaxy\_info:  
author: Juniper  
categories: [‘networking’]  
company: Juniper Networks, Inc.  
galaxy\_tags: [‘networking’, ‘junos’, ‘juniper’]  
license: Apache 2.0  
min\_ansible\_version: 2.1  
platforms: [{‘name’: ‘junos’, ‘versions’: [‘all’]}]  
github\_branch: master  
github\_repo: ansible-junos-stdlib  
github\_user: Juniper  
id: 8138  
imported: 2018-06-01T05:42:42.847519-04:00  
install\_date: Mon Nov 19 21:49:07 2018  
intalled\_version: 2.1.0  
is\_valid: True  
issue\_tracker\_url: [https://github.com/Juniper/ansible-junos-stdlib/issues](https://github.com/Juniper/ansible-junos-stdlib/issues)  
license: Apache 2.0  
min\_ansible\_version: 2.1  
modified: 2018-06-30T05:11:19.035846Z  
open\_issues\_count: 26  
path: [u’/home/jnaughton/.ansible/roles’]  
role\_type: ANS  
stargazers\_count: 197  
travis\_status\_url:

Here is the Ansible config file  
p-mon01{jnaughton}~/network-ansible/ansible [1022] $ grep \[1\] ansible.cfg  
[defaults]  
inventory = hosts  
library = ./modules  
forks = 50  
ansible\_python\_interpreter = /usr/local/bin/python ← this looks correct  
gathering = smart  
roles\_path = /home/jnaughton/.ansible/roles  
host\_key\_checking = False  
fact\_caching = jsonfile  
fact\_caching\_timeout = 86400  
fact\_caching\_connection = /tmp  
retry\_files\_enabled = False  
[privilege\_escalation]  
[paramiko\_connection]  
[ssh\_connection]  
[accelerate]  
[selinux]  
[colors]  
highlight = white  
verbose = blue  
warn = bright purple  
error = red  
debug = dark gray  
deprecate = purple  
skip = cyan  
unreachable = red  
ok = green  
changed = yellow  
diff\_add = green  
diff\_remove = red  
diff\_lines = cyan

The Python version looks correct.  
p-mon01{jnaughton}~ [1005] $ which python  
/usr/local/bin/python  
p-mon01{jnaughton}~ [1006] $ python  
Python 2.7.14 (default, Oct 19 2018, 14:48:27)  
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import jnpr.junos  
> > > jnpr.junos. **version**  
> > > ‘2.2.0’  
> > > quit()

The playbook  
p-mon01{jnaughton}~/network-ansible/ansible/playbooks [1017] $ cat lab-push.pb.yaml

* * *

1. ^#

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [December 8, 2018, 1:48pm UTC](https://forum.ansible.com/t/import-error-no-module-named-plugins-action-normal/29221/2 "2018-12-08T13:48:01Z")

</div>

Could it be that you're mixing a virtualenv with OS package provided modules...?

---

<div class="post-metadata">

**Author:** ![jnaughton](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jnaughton](https://forum.ansible.com/u/jnaughton)\
**Post date:** [December 10, 2018, 3:12pm UTC](https://forum.ansible.com/t/import-error-no-module-named-plugins-action-normal/29221/3 "2018-12-10T15:12:09Z")

</div>

Hi Dick,

No we are not using the virtualenv tool.
