Ansible Script not working - Meraki SDK is not installed. Execute 'pip install meraki'

Solved
scoop263
Conversationalist

Ansible Script not working - Meraki SDK is not installed. Execute 'pip install meraki'

Hi Everyone.

 

I am trying to setup ansible to interact with the meraki api, and I am having difficulties.

I am using the instructions provided on the github. https://github.com/meraki/dashboard-api-ansible

 

However when attempting to perform the basic who_am_i.yml script, it will fail and indicate that the SDK is not installed.

 

I have attached screenshots of my linux workstation.

 

Instead of naming the script who_am_i.yml, I created one called helloworld.yml.

Instead of naming the hosts as meraki_servers, it is called meraki.

 

my Collection output indicating that cisco.meraki is installed and up to date.

Ansible Collection.png

 

My Anisble Version. indicating that the core is 2.17.1 and the python version is 3.12

AnsibleVersion.png

 

My helloworld.yml file, the vars_file is extra but in my environement it is required or else the playbook will fail.

 

HelloWorld.yml.png

 

The output of the playbook for the task.

MerakiSDKNotInstalled.png

 

The output of pip install meraki indicating it is installed.

PipInstall.png

 

While I am uncertain, I think this would be a fraction of the SDK library for meraki but its located in ansible, which is odd.PythonLibrary.png

 

Any help would be greatly appreciated.

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

In that case my guess is that ansible is running in a separate Python environment - not the same one as the Meraki module is being installed into.

 

This post looks related to your issue:
https://community.meraki.com/t5/Developers-APIs/Meraki-SDK-is-not-installed/m-p/235886

 

View solution in original post

4 Replies 4
PhilipDAth
Kind of a big deal
Kind of a big deal

First install Python on your machine.  Once that is installed do a "pip3 install meraki", and if that fails try "pip install meraki".

Python 3.12 is installed on the system, when performing the above commands you mentioned they indicate that "Requirement already satisfied", and the output is exactly the same in regards to pip vs pip3 command. Python has already been re-installed once or twice. 

PhilipDAth
Kind of a big deal
Kind of a big deal

In that case my guess is that ansible is running in a separate Python environment - not the same one as the Meraki module is being installed into.

 

This post looks related to your issue:
https://community.meraki.com/t5/Developers-APIs/Meraki-SDK-is-not-installed/m-p/235886

 

That is correct. I thought it wasnt. but when checking where its running, it is its own virtual environment, I even attempted to have it look outside of that environment but without any luck. so i just copied the entire library over to the virtual environment. 

Get notified when there are additional replies to this discussion.