--- - name: Protection domain V2 Operations hosts: localhost connection: local gather_facts: false vars: hostname: "x.x.x.x" username: "admin" password: "Password" validate_certs: false host_port: 443 tasks: - name: Create Protection Domain register: result dellemc.powerflex.protection_domain_v2: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: "{{ validate_certs }}" port: "{{ host_port }}" protection_domain_name: "domain_1" is_active: true state: "present" - name: Get Protection Domain dellemc.powerflex.protection_domain_v2: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: "{{ validate_certs }}" port: "{{ host_port }}" protection_domain_name: "domain_1" state: "present" - name: Get Protection Domain using ID dellemc.powerflex.protection_domain_v2: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: "{{ validate_certs }}" port: "{{ host_port }}" protection_domain_id: "{{ pd_id }}" state: "present" - name: Modify Protection Domain using ID register: result dellemc.powerflex.protection_domain_v2: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: "{{ validate_certs }}" port: "{{ host_port }}" is_active: false protection_domain_id: "{{ pd_id }}" protection_domain_new_name: "domain_1_renamed" state: "present" - name: Delete Protection Domain using ID register: result dellemc.powerflex.protection_domain_v2: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: "{{ validate_certs }}" port: "{{ host_port }}" protection_domain_id: "{{ pd_id }}" state: "absent"