Search code examples
pythonansibleopenstack

"shade is required for this module" even though shade is installed


Im trying to deploy an ansible playbook to spin up some new openstack instances and keep getting the errorr

"shade is required for this module"

Shade is definitely installed as are all its dependancies.

I've tried adding

localhost ansible_python_interpreter="/usr/bin/env python"

to the ansible hosts file as suggested here, but this did not work.

https://groups.google.com/forum/#!topic/ansible-project/rvqccvDLLcQ

Any advice on solving this would be most appreciated.


Solution

  • On my hosts file I have the following:

    [local]
    127.0.0.1 ansible_connection=local ansible_python_interpreter="/usr/bin/python"
    

    So far I haven't been using venv and my playbooks work fine. By adding the ansible_connection= local, it should tell your playbook to be executed on the Ansible machine (I guess that's what you are trying to do).

    Then when I launch a playbook, I start with the following:

    - hosts: local
      connection: local
    

    Not sure if that's the problem. If this does not work, you should give us more information (extract of your playbook at least).

    Good luck!