UNSOLVED

gdny

updated

4 years ago

Closed

G

gdny

1 Rookie

•

41 Posts

0

825

March 9th, 2023 14:00

Powerstore Ansible Volume module Parameter missing

Hi,

I have a Powerstore Question I’m hoping you could help with…

I trying to create a Volume using the Volume module.

It works as long as I don’t try to set the Appliance (I thought that parameter was remote_appliance_id but I guess not).  However, I need to be able to set the Appliance because we want to manually do this as opposed letting the System Auto set it. 

I’m allowed to set it using the GUI.  I’m looking for the same option with the Ansible Module.

thanks.
glenn.

  • jennifer_john

    1 Rookie

    •

    79 Posts

    704

    0

    Posted March 12th, 2023 22:00

    Hi @gdny 

    Currently setting appliance_id is not supported through the module, we are working on including it in the upcoming releases. Meanwhile the ansible uri module can be used to set the appliance_id. Sharing playbook below for the same

    ---
    - hosts : localhost

      vars :
        array_ip : " 10.*.*.* "
        username : " ** "
        password : " ** "

      tasks :

        - name : Login
          uri :
            url : " https://{ { array_ip }}/api/rest/login_session "
            user : " { {username}} "
            password : " { {password}} "
            method : GET
            validate_certs : no
          register : response

        - debug :
            msg : " Token { { response.dell_emc_token }} "

        - name : Creating a volume with appliance_id
          uri :
            url : " https://{ { array_ip }}/api/rest/volume "
            user : " { {username}} "
            password : " { {password}} "
            method : POST
            body : >
              { "name" : "test-volume", "size":1048576, "appliance_id": "A1" }
            body_format : json
            headers :
              Content-Type : ' application/json '
              DELL-EMC-TOKEN : ' { { response.dell_emc_token }} '
            validate_certs : no
            status_code : 201
          register : vol

        - debug :
            var : vol
     
    For appliance_name to be specified, the json can be modified as  "appliance_id":"name:Appliance1" 
     
    Thanks,
    Jennifer

     

  • gdny

    1 Rookie

    •

    41 Posts

    683

    0

    Posted March 13th, 2023 07:00

    Thanks for the workaround.
    glenn.