# Couldn't resolve module/action 'netapp.ontap.na\_ontap\_rest\_info'

**URL:** <https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416>\
**Category:** Get Help\
**Tags:** vmware, playbook, awx, collections, galaxy-ng\
**Created:** [January 21, 2024, 8:28pm UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416 "2024-01-21T20:28:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 21, 2024, 8:28pm UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/1 "2024-01-21T20:28:27Z")

</div>

I am attempting to run my Ansible playbook against my NetApp cluster, and I receive the following error shown below.

I have met all of the requirements for installing netapp.ontap collections.

What am I missing here? The .yml file looks more than fine and is spelled correctly. I have tried reinstalling “ansible-galaxy collection install netapp.ontap” several times but with no luck.

```auto
ERROR! couldn't resolve module/action 'netapp.ontap.na_ontap_rest_info'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/runner/project/Test-Connectivity.yml': line 20, column 7, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Collect ONTAP Info
^ here

```

```auto

> $ ansible --version
> ansible [core 2.14.9]
> config file = /etc/ansible/ansible.cfg
> configured module search path = ['/home/admin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
> ansible python module location = /usr/lib/python3.9/site-packages/ansible
> ansible collection location = /home/admin/.ansible/collections:/usr/share/ansible/collections
> executable location = /usr/bin/ansible
> python version = 3.9.18 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
> jinja version = 3.1.2
> libyaml = True
> 
> 
> 
> $ ansible-galaxy collection list
> # /home/admin/.ansible/collections/ansible_collections
> Collection Version
> ------------------ -------
> cloud.common 3.0.0
> community.vmware 4.0.1
> netapp.ontap 22.9.0
> vmware.vmware_rest 3.0.0
> 
> 
> MARS40-CLUSTER::> version
> NetApp Release 9.12.1: Tue Jan 31 19:19:43 UTC 2023

```

* * *

- hosts: localhost  
gather\_facts: false  
name: Connectivity Test & Display ONTAP Info

```auto

```

---

<div class="post-metadata">

**Author:** ![akira6592](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akira6592/32/222_2.png) [@akira6592](https://forum.ansible.com/u/akira6592)\
**Post date:** [January 22, 2024, 2:21am UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/2 "2024-01-22T02:21:18Z")

</div>

@marshit Hello.

How did you run the playbook?

For example, ansible-playbook, ansible-navigator, AWX, Automation Controller, etc.

I think the environment in which you installed the collection and the environment in which you run Playbook may be different.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 22, 2024, 2:36am UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/3 "2024-01-22T02:36:42Z")

</div>

@akira6592 Hello, so I’m going to try my best to explain this (LOL)…So, I only run playbooks by way of AWX.

I installed AWX using K3s, so I have running pods.

```auto
> [admin@RHEL9-AWX ~]$ kubectl get pods -n awx
> NAME READY STATUS RESTARTS AGE
> awx-postgres-13-0 1/1 Running 8 (4h15m ago) 177d
> awx-task-9b46bf5fd-wp768 4/4 Running 32 (4h15m ago) 177d
> awx-web-7c9cc95f8b-bkp6r 3/3 Running 24 (4h15m ago) 177d
> awx-operator-controller-manager-6c58d59d97-27qt2 2/2 Running 47 (4h14m ago) 177d

```

That being said, I didn’t do anything special about installing, as you can see from my command, and yes, maybe that’s the issue, but I wasn’t sure how or what differently I needed to do.

But I only use the default ‘AWX-EE’ environment within AWX.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 22, 2024, 2:45am UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/4 "2024-01-22T02:45:38Z")

</div>

@akira6592 Since you brought it up, do you mean I need to do something like this - “ansible-galaxy collection install --environment awx-ee \<collection\_name\>”.

Does that look to be what you mean?

I will try that and update the ticket. Sometimes, I just need a little help : )

---

<div class="post-metadata">

**Author:** ![akira6592](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akira6592/32/222_2.png) [@akira6592](https://forum.ansible.com/u/akira6592)\
**Post date:** [January 22, 2024, 12:06pm UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/5 "2024-01-22T12:06:43Z")

</div>

@marshit

> But I only use the default ‘AWX-EE’ environment within AWX.

Thanks for the information.

`AWX-EE` refers to `quay.io/awx-ee`. This image [does not have](https://github.com/ansible/awx-ee/blob/devel/execution-environment.yml#L12-L26) the `netapp.ontap` collection.

So you need to include the `netapp.ontap` collection in your [Execution environment](https://ansible.readthedocs.io/projects/awx/en/latest/userguide/execution_environments.html).

There are two ways to do this.

# 1. Create a custom image

You can use [ansible-builder](https://ansible.readthedocs.io/projects/builder/en/stable/) to build a custom image containing the `netapp.ontap` collection.

- Build a custom image includes `netapp.ontap` collection.
- Push the custom image
- Define it as an [Execution Environment](https://ansible.readthedocs.io/projects/awx/en/latest/userguide/execution_environments.html) on AWX
- Configure the job template to run the job using the new (custom) Execution Environment

# 2. Include `collections/requirements.yml` in the project

If you have difficulty building custom images, this may be a good option.

Create a file called `collections/requirements.yml` in the project containing the Playbook with the following contents.

```yaml
---
collections:
  - name: netapp.ontap

```

This will automatically install the `netapp.ontap` collection when the job template is started.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 22, 2024, 4:18pm UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/6 "2024-01-22T16:18:10Z")

</div>

@akira6592 I’ll try this and get back to you with an update later today.

---

<div class="post-metadata">

**Author:** ![marshit](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@marshit](https://forum.ansible.com/u/marshit)\
**Post date:** [January 22, 2024, 7:36pm UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/7 "2024-01-22T19:36:28Z")

</div>

@akira6592 I created a requirements.yml file and added it to the root of my GitHub repository.

```auto
---
collections:
- netapp.aws                    
- netapp.azure                  
- netapp.cloudmanager           
- netapp.elementsw               
- netapp.ontap                  
- netapp.storagegrid            
- netapp.um_info                 
- netapp_eseries.santricity       
- netbox.netbox

```

Thank you very much for your help!

---

<div class="post-metadata">

**Author:** ![akira6592](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akira6592/32/222_2.png) [@akira6592](https://forum.ansible.com/u/akira6592)\
**Post date:** [January 23, 2024, 11:14am UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/8 "2024-01-23T11:14:25Z")

</div>

@marshit  
My pleasure 😀  
If it worked, could you mark my post as a solution?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 22, 2024, 11:15am UTC](https://forum.ansible.com/t/couldnt-resolve-module-action-netapp-ontap-na-ontap-rest-info/3416/9 "2024-02-22T11:15:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
