Closed LeoHu1985 closed 4 months ago
@LeoHu1985, could you please share details of your playbook, ansible version, and powerflex version?
root@S1Ans:/home/lab/Hackathon-Workshop/vm-ps-auto# ansible --version ansible [core 2.14.1] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /root/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/lab/Hackathon-Workshop/vm-ps-auto:/home/lab:/home/lab executable location = /root/.local/bin/ansible python version = 3.9.16 (main, Dec 13 2022, 12:53:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] (/usr/local/bin/python3.9) jinja version = 3.1.2 libyaml = True
PowerFlex version 3.6
Playbook as below
root@S1Ans:/home/lab/PowerFlex-Playbook/powerflex-demo-playbooks# cat dellemc_powerflex_volume_demo.yml
name: Volume operations on powerflex SDS. hosts: localhost connection: local gather_facts: False vars: gateway_host: '172.16.100.128' username: 'admin' password: 'P@ssw0rd' verifycert: False protection_domain_name: "PD-1" storage_pool_name: "SP-1" vol_name: "sample_ansible_volume_1"
collections:
tasks:
name: Create a volume register: result dellemc.powerflex.volume: gateway_host: "{{gateway_host}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" vol_name: "{{vol_name}}" storage_pool_name: "{{storage_pool_name}}" protection_domain_name: "{{protection_domain_name}}" sdc:
name: Set volume id from previous result set_fact: vol_id: "{{result.volume_details.id}}"
Closing this issue as this has been fixed in the latest v2.4.0
How can the Team help you today?
followed installation steps to complete module installation but failed to run PowerFlex ansible modules reporting errors as below
Details: ? fatal: [localhost]: FAILED! => {"changed": false, "msg": "Create volume sample_ansible_volume_1 operation failed with error Failed to create PowerFlex Volume. Error: {'message': 'Request header Content-Type should be application/json', 'httpStatusCode': 400, 'errorCode': 0}"}