user@jumphost:~/ontap-setup-automation$ ssh admin@cluster1-01
Password:
cluster1-01::> version
NetApp Release 9.8P10: Fri Feb 04 19:51:21 UTC 2022
Notice: Showing the version for the local node; the cluster-wide version could not be determined.
cluster1-01::>
Playbook
ansible localhost -m netapp.ontap.na_ontap_rest_info -a "validate_certs=no hostname=cluster1-01 username=admin password=Netapp1! gather_subset=cluster_node_info"
Steps to Reproduce
ansible localhost -m netapp.ontap.na_ontap_rest_info -a "validate_certs=no hostname=cluster1-01 username=admin password=Netapp1! gather_subset=cluster_node_info"
Expected Results
I expect at least this output:
user@jumphost:~/ontap-setup-automation$ ansible localhost -m netapp.ontap.na_ontap_restit -a "validate_certs=no hostname=cluster1-01 username=admin password=Netapp1! api=/cluster/nodes"
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | CHANGED => {
"changed": true,
"response": {
"num_records": 2,
"records": [
{
"name": "cluster1-02",
"uuid": "8eb0365d-173f-11ed-954d-00a0985cb457"
},
{
"name": "cluster1-01",
"uuid": "9a968ea4-173f-11ed-a196-00a0985d172e"
}
]
},
"status_code": 200
}
user@jumphost:~/ontap-setup-automation$
But this is output is what I was actually looking for:
user@jumphost:~/ontap-setup-automation$ ansible localhost -m netapp.ontap.na_ontap_rest_info -a "validate_certs=no hostname=cluster1-01 username=admin password=Netapp1! gather_subset=cluster_node_info" -vvvv
ansible [core 2.13.2]
config file = /home/user/ontap-setup-automation/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /home/user/.local/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
Using /home/user/ontap-setup-automation/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
[WARNING]: No inventory was parsed, only implicit localhost is available
Loading callback plugin minimal of type stdout, v2.0 from /home/user/.local/lib/python3.8/site-packages/ansible/plugins/callback/minimal.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
META: ran handlers
Loading collection netapp.ontap from /home/user/.ansible/collections/ansible_collections/netapp/ontap
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: user
<127.0.0.1> EXEC /bin/sh -c 'echo ~user && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/user/.ansible/tmp `"&& mkdir "` echo /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514 `" && echo ansible-tmp-1660142573.1082475-67364-24143402545514="` echo /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514 `" ) && sleep 0'
Using module file /home/user/.ansible/collections/ansible_collections/netapp/ontap/plugins/modules/na_ontap_rest_info.py
<127.0.0.1> PUT /home/user/.ansible/tmp/ansible-local-67360i_kodpdw/tmpawnas6ew TO /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514/AnsiballZ_na_ontap_rest_info.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514/ /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514/AnsiballZ_na_ontap_rest_info.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514/AnsiballZ_na_ontap_rest_info.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/user/.ansible/tmp/ansible-tmp-1660142573.1082475-67364-24143402545514/ > /dev/null 2>&1 && sleep 0'
localhost | FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"cert_filepath": null,
"feature_flags": {},
"fields": null,
"gather_subset": [
"cluster_node_info"
],
"hostname": "cluster1-01",
"http_port": null,
"https": false,
"key_filepath": null,
"max_records": 1024,
"ontapi": null,
"owning_resource": null,
"parameters": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"state": null,
"use_python_keys": false,
"use_rest": "auto",
"username": "admin",
"validate_certs": false
}
},
"msg": {
"code": "9241607",
"message": "Only POST/OPTIONS on /api/cluster, GET/HEAD/OPTIONS on /api/cluster/nodes, or calls on /api/cluster/jobs are available in precluster."
}
}
user@jumphost:~/ontap-setup-automation$
Summary
When attempting to pull the node data information precluster to use building the cluster, it fails.
Component Name
na_ontap_rest_info
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
I expect at least this output:
But this is output is what I was actually looking for:
Actual Results