On Mon, 6 Apr 2020 21:59:36 -0700 (PDT)
mahesh g o <[email protected]> wrote:

> i have parameter called *type *which has 2 values [ rw and dp].
> How to create 10 volumes with type rw and 10 volumes type dp in 
> one playbook.

An option would be the "ternary" filter. For example
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#id8

  tasks:
     - name: Create FlexVol
       na_ontap_volume:
         ...
         type: "{{ (volume_item|int < 11)|ternary('rw', 'dp') }}"
         ...
       with_sequence: start=1 end=20
       loop_control:
         loop_var: volume_item

HTH,

        -vlado

-- 
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/20200407071800.6962f94a%40gmail.com.

Attachment: pgpbLZi7HiWRz.pgp
Description: OpenPGP digital signature

Reply via email to