On Thu, 20 Jul 2017 08:04:54 -0700 (PDT)
aldyth maharsha <
aldy...@gmail.com> 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:
bra...@majic.rs
Please use only Free formats when sending attachments to me.
Бранко Мајић
XMPP:
bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.