ansible-collections / netapp.ontap

Ansible collection to support NetApp ONTAP configuration.
https://galaxy.ansible.com/netapp/ontap
GNU General Public License v3.0
55 stars 35 forks source link

Missing Modules After Install netapp.ontap Collection #199

Closed marshit closed 5 months ago

marshit commented 8 months ago

Summary

When trying to run a template job within AWX, I receive the following error:

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

I would expect the job to run since I have already installed the netapp.ontap galaxy collection.

Component Name

ontap_rest_info

Ansible Version

$ 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

ONTAP Collection Version

$ 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

ONTAP Version

MARS40-CLUSTER::> version
NetApp Release 9.12.1: Tue Jan 31 19:19:43 UTC 2023

Playbook

---
- hosts: localhost
  gather_facts: false
  name: Connectivity Test & Display ONTAP Info

  tasks:
    - name: Test Connectivity
      uri:
        url: "https://{{ netapp_hostname }}"
        method: GET
        validate_certs: false
        return_content: no
      register: response

    - name: Print Connectivity Test Result
      debug:
        msg: "Connectivity test passed with status code: {{ response.status }}"
      when: response.status == 200

    - name: Collect ONTAP Info
      netapp.ontap.na_ontap_rest_info:
        hostname: "{{ netapp_hostname }}"
        username: "{{ netapp_username }}"
        password: "{{ netapp_password }}"
        validate_certs: false
        gather_subsets: "svm/svms"
      register: ontap_info

    - name: Print ONTAP Response
      debug:
        msg: "{{ ontap_info }}"

Steps to Reproduce

Expected Results

I would expect the playbook to run and use the module provided.

Actual Results

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
carchi8py commented 8 months ago

@marshit that should work. Can you tun the module again with -vvv and send the output.