You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm providing the user and password in my file:
group_vars/all.yml
ansible_user: "netengauto"
ansible_password: "xxxx"
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
playbook:
name: Test get Facts
hosts: all
connection: httpapi
gather_facts: false
task path: /local/opengear.yaml:17
The full traceback is:
File "/tmp/ansible_opengear.om.om_facts_payload_148ck5qu/ansible_opengear.om.om_facts_payload.zip/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/network.py", line 218, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/tmp/ansible_opengear.om.om_facts_payload_148ck5qu/ansible_opengear.om.om_facts_payload.zip/ansible/module_utils/connection.py", line 200, in rpc
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [10.75.4.59]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"gather_network_resources": [
"ports"
],
"gather_subset": [
"min"
]
}
},
"msg": "Could not connect to https://10.75.4.59:22/api/v2/sessions/: Tunnel connection failed: 403 Forbidden"
}
Testing same user and password using Curl works fine
root@b98337f3a3da:/local# curl -k "https://10.75.4.59/api/v2/sessions/" -X POST -H 'Content-Type: application/json' -d '{"username":"netengauto","password":"xxxx"}'
{"message":"Redirecting to new session at /api/v2/sessions/self","sid":"xxx"}
What part is missing to get the facts for the Opengear?
The text was updated successfully, but these errors were encountered:
I'm providing the user and password in my file:
group_vars/all.yml
ansible_user: "netengauto"
ansible_password: "xxxx"
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
playbook:
name: Test get Facts
hosts: all
connection: httpapi
gather_facts: false
vars:
ansible_network_os: opengear.om.om
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
tasks:
ansible.builtin.debug:
msg: "{{ hostvars }}"
opengear.om.om_facts:
gather_subset: min
gather_network_resources: ports
ansible.builtin.debug:
msg: "{{ ansible_facts }}"
But I'm getting authentication errors:
task path: /local/opengear.yaml:17
The full traceback is:
File "/tmp/ansible_opengear.om.om_facts_payload_148ck5qu/ansible_opengear.om.om_facts_payload.zip/ansible_collections/ansible/netcommon/plugins/module_utils/network/common/network.py", line 218, in get_capabilities
capabilities = Connection(module._socket_path).get_capabilities()
File "/tmp/ansible_opengear.om.om_facts_payload_148ck5qu/ansible_opengear.om.om_facts_payload.zip/ansible/module_utils/connection.py", line 200, in rpc
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [10.75.4.59]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"gather_network_resources": [
"ports"
],
"gather_subset": [
"min"
]
}
},
"msg": "Could not connect to https://10.75.4.59:22/api/v2/sessions/: Tunnel connection failed: 403 Forbidden"
}
Testing same user and password using Curl works fine
root@b98337f3a3da:/local# curl -k "https://10.75.4.59/api/v2/sessions/" -X POST -H 'Content-Type: application/json' -d '{"username":"netengauto","password":"xxxx"}'
{"message":"Redirecting to new session at /api/v2/sessions/self","sid":"xxx"}
What part is missing to get the facts for the Opengear?
The text was updated successfully, but these errors were encountered: