HPE OneView
1753637 Members
5784 Online
108798 Solutions
New Discussion

automate with ansible to change firmware baseline in server profiles

 
pgarcia79
Occasional Contributor

automate with ansible to change firmware baseline in server profiles

Hello, I am trying to automate a task in a synergy 1200 frame with OneView 5.4

I am using the HewlettPackard / oneview-ansible

Change the firmware baseline in all the profiles using the HPE ansible module. I can't find an example for that in the "examples" folder and I can't any documentation with all the options available.

So this is the code I used to change one of my profiles

 

- hosts: localhost
  vars:
    - config: /opt/oneview/configs/config_ntr.json
  tasks:
    - name: change profile firmware baseline
      oneview_server_profile:
        config: "{{ config }}"
        state: present
        data:
          name: EMCC-01
          firmware: /rest/firmware-drivers/HPE_Synergy_Custom_SPP_2019_09_20190926_Z7550-96770
      delegate_to: localhost
      register: result

    - debug: msg="{{result.msg}}"

 

 

any hints on how to do that?

I am getting the error: "The nested JSON \"firmware\" sent in the request is not a valid array or collection.', u'message': u'The JSON cannot be mapped to array or collection.'

so it is even possible to do that? I can't find any proper documentation with the full set of options on each ansible module

 

Regards