This project is no longer being developed and has limited support. Please use the newer Ansible Collection project: https://github.com/HewlettPackard/oneview-ansible-collection
While trying to power on (or power off) a blade in oneview what names can we use to reference a blade? So far the only valid "name" that works for me to power on or power off is, for example:
server_hardwares:
name: My Blade, bay 5
as returned by oneview_server_hardware_facts.
Is this the only valid reference while performing power operations? I'd like to use something else...maybe uuid, or uri? I've tried several combinations and it only seems to allow 'server_hardwares.name' for powering on or off.
hosts: my_host
vars:
config: "{{ playbook_dir }}/oneview_config.json"
server_hardware_hostname: "My Blade, bay 5"
tasks:
name: Power On the server hardware
oneview_server_hardware:
config: "{{ config }}"
state: power_state_set
data:
name : '{{ server_hardware_hostname }}'
powerStateData:
powerState: "On"
powerControl: "MomentaryPress"
register: output
delegate_to: localhost
debug: var=output
Expected Result
This works fine as long as I use the 'server_hardwares.name' value.
Actual Result
This works fine, but is there any other way to reference a blade to power on/off? I'd like to be able to use the 'server_hardwares.uuid' or 'server_hardwares.uri' reference. Is this possible? Any examples would be nice. Thanks.
Scenario/Intent
While trying to power on (or power off) a blade in oneview what names can we use to reference a blade? So far the only valid "name" that works for me to power on or power off is, for example:
server_hardwares: name: My Blade, bay 5
as returned by oneview_server_hardware_facts.
Is this the only valid reference while performing power operations? I'd like to use something else...maybe uuid, or uri? I've tried several combinations and it only seems to allow 'server_hardwares.name' for powering on or off.
Environment Details
Steps to Reproduce
hosts: my_host vars: config: "{{ playbook_dir }}/oneview_config.json" server_hardware_hostname: "My Blade, bay 5" tasks:
name: Power On the server hardware oneview_server_hardware: config: "{{ config }}" state: power_state_set data: name : '{{ server_hardware_hostname }}' powerStateData: powerState: "On" powerControl: "MomentaryPress" register: output delegate_to: localhost
debug: var=output
Expected Result
This works fine as long as I use the 'server_hardwares.name' value.
Actual Result
This works fine, but is there any other way to reference a blade to power on/off? I'd like to be able to use the 'server_hardwares.uuid' or 'server_hardwares.uri' reference. Is this possible? Any examples would be nice. Thanks.