I have the below playbook which creates 20 volumes

i have parameter called *type *which has 2 values [ rw and dp].

my req is: how to create 10 volumes with type rw and 10 volumes type dp in 
one playbook.


 tasks:
    - name: Create FlexVol
      na_ontap_volume:
        state: absent
        name: vol1{{item}}
        is_infinite: False
        aggregate_name: aggr1
        *type*: 
        size: 10
        size_unit: gb
        junction_path: "/vol{{ item }}"
        tiering_policy: auto
        policy: default
        percent_snapshot_space: 20
        vserver: systemic_iscsi_aggr3svm1
        wait_for_completion: True
        space_slo: none
        nvfail_enabled: False
        comment: ansible created volume
        hostname: "{{aiqumip  }}"
        username: "{{ aiqumusername }}"
        password: "{{ aiqumpassword }}"
      with_sequence: start=1 end=20
      loop_control:
        loop_var: volume_item
      register: volcreate
      ignore_errors: True
    - name: 100 volumes created successfully
      debug: msg "{{ volcreate }}"

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bb2dd832-1dac-4eb3-a1ae-67146db7a996%40googlegroups.com.

Reply via email to