Closed avgovind closed 3 years ago
@avgovind Hi Govind, we are looking into this, ill update you once we have this updated in our library.
Thank you very much for adding this enhancement request. I am going to try soon and close this issue.
I got the code from pull request and tried using the following playbook on OneView 5.4 (it failed with API version 1200 and works only when I set to 2000):
- hosts: localhost
tasks:
- name: Enable Server Maintenance Mode
oneview_server_hardware:
hostname: 10.x.y.z
username: administrator
password: password
api_version: 2000
state: enable_maintenance_mode
data:
name : 'ILOMXQ91002T3.v1000.cce01.presales.hpecorp.net'
delegate_to: localhost
Can you please merge to main branch so that the customer can access the changes?
Scenario/Intent
OneView 5.2 introduced ability to put servers in Maintenance mode to stop server alerts going to Activities and SCMB. One of the customers is asking for ability to set the maintenance mode through Ansible playbooks. Request to add this support in the Ansible library and update the examples.
Environment Details
Steps to Reproduce
NA
Expected Result
Change server state from Maintenance mode Disable to Enable
Actual Result
Could not find a way to set maintenance mode using the present Ansible-OneView library.