- name: Using Spectrum Virtualize collection to create a volume group
  hosts: localhost
  vars:
    - clustername: clustername
    - username: username
    - password: password
    - domain: domain
  collections:
    - ibm.spectrum_virtualize
  gather_facts: no
  connection: local
  tasks:
    - name: Create a new volume group
      ibm_svc_manage_volumegroup:
        clustername: "{{ clustername }}"
        domain: "{{ domain }}"
        username: "{{ username }}"
        password: "{{ password }}"
        name: vg1
        state: present
    - name: Create volumegroup with existing snapshotpolicy
      ibm_svc_manage_volumegroup:
        clustername: "{{ clustername }}"
        domain: "{{ domain }}"
        username: "{{ username }}"
        password: "{{ password }}"
        name: vg2
        state: present
        snapshotpolicy: snapshotpolicy2
