Skip to content
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

Add support for setting "server name" and "server profle" in oneview_server_hardware module #709

Open
johnpaulsen1 opened this issue Mar 3, 2024 · 0 comments

Comments

@johnpaulsen1
Copy link

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:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant