Scenario/Intent
When I add a new server hardware, I want to be able to also set:
- "serverName" | "servername"
- "serverProfileUri" | "serverprofileuri"
At the moment it appears that I am unable to set those params in the "data" dictionary in the oneview_server_hardware module.
It will be much appreciated if you can this functionality.
So that when I add a new server I don't need to manually edit it and populate the "Server Name" and "Server Profile".
Environment Details
- Module Version: 8.7.0
- Ansible Version: 2.14.2
- OneView Appliance Version: 8.50.00-0482370
- OneView Client API Version: 5600
- Python Version: 3.9.2
- python-hpOneView SDK Version: 8.7.0
- Platform: Debian 11
Steps to Reproduce
When I try set the suggested keys (serverName, serverProfileUri) and their value pairs in the "data" dictionary, my ansible play fails.
See ansible playbook task below:
- name: "Add server hardware to HPE OneView"
oneview_server_hardware:
config: "{{ config }}"
state: present
data:
servername: "test_hostname"
serverprofileuri: "test_hostname_profile"
hostname: "10.10.10.10"
username: "ilo_user"
password: "ilo_password"
force: false
licensingIntent: "OneView"
configurationState: "Managed"
initialScopeUris:
- "{{ scopes[0].uri }}"
ansible play fails with:
'The field named servername near line 1, column 17 is not a valid field in this JSON object.
Expected Result
Adds my server with the "Server Name" and "Server Profile" set.
Actual Result
I'm able to successfully add my server if I exclude my suggested keys, though I need to then manually set the "Server Name" and "Server Profile", as those are "not set" once the play is done adding my server.
See screenshot below of this:

Scenario/Intent
When I add a new server hardware, I want to be able to also set:
At the moment it appears that I am unable to set those params in the "data" dictionary in the oneview_server_hardware module.
It will be much appreciated if you can this functionality.
So that when I add a new server I don't need to manually edit it and populate the "Server Name" and "Server Profile".
Environment Details
Steps to Reproduce
When I try set the suggested keys (serverName, serverProfileUri) and their value pairs in the "data" dictionary, my ansible play fails.
See ansible playbook task below:
ansible play fails with:
Expected Result
Adds my server with the "Server Name" and "Server Profile" set.
Actual Result
I'm able to successfully add my server if I exclude my suggested keys, though I need to then manually set the "Server Name" and "Server Profile", as those are "not set" once the play is done adding my server.

See screenshot below of this: