# Ansible 2.0 -- "shade is required for this module"

**URL:** <https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891>\
**Category:** Ansible Project\
**Created:** [July 29, 2015, 7:22pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891 "2015-07-29T19:22:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Gordon](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@Chris\_Gordon](https://forum.ansible.com/u/Chris_Gordon)\
**Post date:** [July 29, 2015, 7:22pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/1 "2015-07-29T19:22:47Z")

</div>

I’m trying to use the os\_server module in Ansible 2.0 and get the following error:

fatal: [jump]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “shade is required for this module”}

Here’s what I have:

- Python 2.7.10 (Mac, installed via Homebrew)
- Using a virtual environment.
- shade installed in venv via pip (pulled all of it’s dependencies, at least as far as I can tell)
- Ansible cloned from git, devel branch at commit 8798ce1973a5fd0f8d84e001281699337ddabda4
- Installed ansible 2.0 by “python setup.py install” from the venv python interpreter. It installed in site-packages as expected.

With python in the venv, I can import shade without a problem and create some shade objects.

I’m just starting to test with 2.0, so I have a very simply playbook calling just a single role with a single task. My Openstack.rc file is sourced and present in my environment. Other openstack cli tools (nova, neutron, etc.) work fine, so I don’t include an auth dictionary in the task.

Playbook:

- hosts: jump  
connection: local  
roles:
- create\_vm

create\_vm role’s task:

- os\_server:  
state: present  
name: jump  
image: centos7u1-cloud  
flavor: ostck.t2.v3.small  
key\_name: mykeyname  
nics:
- net-name: priv\_net  
meta:  
group: jump

Any ideas? Happy to provide more details or test anything.

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![Guido\_Garcia](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@Guido\_Garcia](https://forum.ansible.com/u/Guido_Garcia)\
**Post date:** [August 11, 2015, 2:44pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/2 "2015-08-11T14:44:17Z")

</div>

Hi Chris. Same here. Did you manage to fix this issue? Thanks.

---

<div class="post-metadata">

**Author:** ![Aaron\_Trout](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Aaron\_Trout](https://forum.ansible.com/u/Aaron_Trout)\
**Post date:** [August 13, 2015, 7:14pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/3 "2015-08-13T19:14:35Z")

</div>

Exact same setup, same problem. I opened an issue on Github but it got shot down 🙂

Maybe if this is an actual problem it can get re-opened: [https://github.com/ansible/ansible-modules-core/issues/1910](https://github.com/ansible/ansible-modules-core/issues/1910)

Aaron

---

<div class="post-metadata">

**Author:** ![David\_Shrewsbury1](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@David\_Shrewsbury1](https://forum.ansible.com/u/David_Shrewsbury1)\
**Post date:** [August 13, 2015, 7:25pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/4 "2015-08-13T19:25:51Z")

</div>

The problem is your environment. I use Python from Homebrew, but I don’t  
use a virtualenv b/c it’s hard to make ansible play nicely with that.

When ansible connects to the host, ‘jump’ for you, it’s going to automatically  
use the system python. You can set a different interpreter by adding this to  
your ansible hosts file for the ‘jump’ host:

jump ansible\_python\_interpreter=/path/to/python

The path should point to the interpreter that has shade installed.

Alternatively, install shade in the system python.

-Dave

---

<div class="post-metadata">

**Author:** ![James\_Martin](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@James\_Martin](https://forum.ansible.com/u/James_Martin)\
**Post date:** [August 14, 2015, 5:12pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/5 "2015-08-14T17:12:15Z")

</div>

If you’ve installed shade into a virtualenv on your ansible control machine, you may need to tell ansible to use that virtualenv in order to detect it. I’ve done it like so in my hosts file for other modules (like boto):

localhost ansible\_python\_interpreter=“/usr/bin/env python”

- James

---

<div class="post-metadata">

**Author:** ![Guido\_Garcia](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@Guido\_Garcia](https://forum.ansible.com/u/Guido_Garcia)\
**Post date:** [August 14, 2015, 7:36pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/6 "2015-08-14T19:36:11Z")

</div>

Thanks James. Now it works like a charm.

---

<div class="post-metadata">

**Author:** ![zerros](https://avatars.discourse-cdn.com/v4/letter/z/9de0a6/32.png) [@zerros](https://forum.ansible.com/u/zerros)\
**Post date:** [July 21, 2016, 7:25pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/7 "2016-07-21T19:25:02Z")

</div>

Hi, forgive me for my bad english.

I have exactly the same problem with ansible 2.2 and python 2.7. All packages are installed in system, no venv but ansible continue with  
fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “shade is required for this module”}

I know this post is already solved since 2015, but if someone could help me …

Thanks.

---

<div class="post-metadata">

**Author:** ![navdeep\_uniyal](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@navdeep\_uniyal](https://forum.ansible.com/u/navdeep_uniyal)\
**Post date:** [July 28, 2016, 12:28pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/8 "2016-07-28T12:28:54Z")

</div>

Could you resolve the issue? If yes, please share the solution here. I am not using virtualenv, still getting the same issue.

Thank you

---

<div class="post-metadata">

**Author:** ![Amit\_Chaudhary](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Amit\_Chaudhary](https://forum.ansible.com/u/Amit_Chaudhary)\
**Post date:** [September 24, 2016, 2:07am UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/9 "2016-09-24T02:07:35Z")

</div>

I am having the same issue, where it gives error regarding shade. I have tried running in virtalenv also but no luck.

---

<div class="post-metadata">

**Author:** ![Amit\_Chaudhary](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Amit\_Chaudhary](https://forum.ansible.com/u/Amit_Chaudhary)\
**Post date:** [September 24, 2016, 2:07am UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/10 "2016-09-24T02:07:50Z")

</div>



---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 4:40pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/11 "2016-09-26T16:40:35Z")

</div>

Same issue here, but I did some experimenting to see what the problem is. I found that running the following command:  
python -c “import shade”  
provided a lot of useful information about why it wasn’t loading the shade library.

~Rich

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 4:55pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/12 "2016-09-26T16:55:24Z")

</div>

In my case, the file permissions were wrong on some of the package directories that pip had created in site-packages, and one undeclared transitive dependency (importlib) was missing.

---

<div class="post-metadata">

**Author:** ![unixfox\_Emilien](https://avatars.discourse-cdn.com/v4/letter/u/ea666f/32.png) [@unixfox\_Emilien](https://forum.ansible.com/u/unixfox_Emilien)\
**Post date:** [December 4, 2016, 2:11pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/13 "2016-12-04T14:11:25Z")

</div>

Try installing ansible using pip because I don’t know why the python environment of the ansible package provided by my distro (ArchLinux) isn’t the same as the shade module (installed using pip).

---

<div class="post-metadata">

**Author:** ![jordi.roig](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jordi.roig](https://forum.ansible.com/u/jordi.roig)\
**Post date:** [July 18, 2017, 3:13pm UTC](https://forum.ansible.com/t/ansible-2-0-shade-is-required-for-this-module/18891/14 "2017-07-18T15:13:34Z")

</div>

Thanks Richard that helped a lot!!
