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..Example my
script below
---
- hosts: localhost
connection: local
vars:
vcenter: vcenter01
datastore: datastore-1
datacenter: dc01
vmcluster: cluster01
vmtemplate: OEL69
tasks:
- name: Create vm from template
vmware_guest:
hostname: "{{ vcenter }}"
username: [email protected]
password: secret
validate_certs: no
datacenter: "{{ datacenter }}"
name: "webapps-{{ item }}"
template: "{{ vmtemplate }}"
cluster: "{{ vmcluster }}"
folder: "/APPS"
state: poweredon
with_sequence: start=1 end=20
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
--
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/5557530a-1a4b-4270-aa21-7d0056fa83a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.