-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key authentication doesn't work #89
Comments
HMC REST API wont support passwordless login (login using ssh keys) . Since |
Thanks, that explains it. The full traceback is: |
This looks like any issue. Will drop the fix along with Dec release. |
Using version 1.6.0 of the collection, I found that for module powervm_lpar_instance authentication with SSH public/private key does not work.
The hscroot user can login to the HMC remotely using keys.
The issue
The respective part in the playbook looks like this:
...
tasks:
- name: create lpar
powervm_lpar_instance:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
...
Running the playbook, I got this error:
...
The full traceback is:
File "/tmp/ansible_powervm_lpar_instance_payload_g9343xdc/ansible_powervm_lpar_instance_payload.zip/ansible_collections/ibm/power_hmc/plugins/modules/powervm_lpar_instance.py", line 987, in create_partition
File "/tmp/ansible_powervm_lpar_instance_payload_g9343xdc/ansible_powervm_lpar_instance_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_rest_client.py", line 239, in init
self.session = self.logon()
File "/tmp/ansible_powervm_lpar_instance_payload_g9343xdc/ansible_powervm_lpar_instance_payload.zip/ansible_collections/ibm/power_hmc/plugins/module_utils/hmc_rest_client.py", line 253, in logon
timeout=300)
File "/tmp/ansible_powervm_lpar_instance_payload_g9343xdc/ansible_powervm_lpar_instance_payload.zip/ansible/module_utils/urls.py", line 1390, in open_url
unredirected_headers=unredirected_headers)
File "/tmp/ansible_powervm_lpar_instance_payload_g9343xdc/ansible_powervm_lpar_instance_payload.zip/ansible/module_utils/urls.py", line 1294, in open
r = urllib_request.urlopen(*urlopen_args)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/opt/freeware/lib64/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
fatal: [XXXXXXXX]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"action": null,
"advanced_info": null,
"all_resources": null,
"delete_vdisks": null,
"hmc_auth": {
"password": null,
"username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
},
...
"msg": "PMCSS007: The authorization filter did not detect a valid session. Access has been denied. Check the allow remote access via the web setting in the console user properties, or check the request for a valid session id. "
Expected behavior
Playbook is being executed on HMC. The same authentication scheme is working without problems using module hmc_command.
Environment
The text was updated successfully, but these errors were encountered: