On Thu, 20 Jul 2017 08:04:54 -0700 (PDT)
aldyth maharsha <[email protected]> wrote:
> Hi All
>
> I have question and I'm newbie in ansible...I try to clone multiple
> vm from template in vmware with each of them have different ip
> address.
>
> I can clone 20 vm from template successfully but when I tried to
> assign IP address I dont know how to create side by side loop like
> this
>
> webapps-1 192.168.10.101
> webapps-2 192.168.10.102
> webapps-3 192.168.10.103
>
> and so on until 20...So how to create side by side loop with
> different iteration?...Thank you
Did you consider using a bit of arithmetic instead? Or this is not
flexible enough for you?
E.g. you could do "{{ 100 + item | int }}" (take note you need the "|
int" on item because it's a string). Preferably you'd make the "100" a
parameter instead of leaving it in as magic, of course :)
Best regards
--
Branko Majic
XMPP: [email protected]
Please use only Free formats when sending attachments to me.
Бранко Мајић
XMPP: [email protected]
Молим вас да додатке шаљете искључиво у слободним форматима.
--
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/20170720214636.18fbcd2a%40majic.rs.
For more options, visit https://groups.google.com/d/optout.