if I write this, i do not get a variable list:
   - set_fact:
       services: "{{ services + item }}"
     with_sequence: count=99
   - debug: msg="sequence {{ services }}"

ok: [SRV1] => {
    "msg": "sequence 
SRV123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899"
}

the result expected is SRV1, SRV2, SRV3 ....

Le mardi 7 février 2017 14:45:44 UTC+1, fanvalt a écrit :
>
> Hello,
>
> Actually I wrote my playbook this way to set values id the dual variable 
> is the string value SRV:
>
>    - set_fact:
>       distrib: "{{ distribsrv }}"
>       Directoryname: "{{ Directorysrv }}"
>      when: dual == 'SRV'
>
> I would like to modify the when condition to run it when dual == 'SRV1', 
> "SRV2' ... etc, is there a way to do a when condition : when : dual like 
> 'SRV*' ?
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/705b92df-cb3d-4d9a-97d4-2e1bac6eed39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to