Hi , New to ansible . Trying to spin up a VM with ansible and pysphere and
using pre-defined template.
- hosts: 127.0.0.1
connection: local
user: root
sudo: false
gather_facts: false
serial: 1
tasks:
- vsphere_guest:
vcenter_hostname: myhost.domain.com
username: "myusername"
password: "******"
guest: wintest
from_template: yes
template_src: vCOWin2008R2ENT_VM9_Apr15
resource_pool: "/Resources"
cluster: mytestcluster
vm_disk:
disk1:
size_gb: 1
type: thin
datastore: vmw00xx-local-storage
folder: Linux
vm_nic:
nic1:
type: vmxnet3
network: OP-test-nonprod-1999
network_type: standard
vm_hardware:
memory_mb: 1024
num_cpus: 1
osid: windows7Server64Guest
scsi: paravirtual
esxi:
datacenter: SITE1
hostname: vmw00xx.ghanp.kfplc.com
The VM is getting deployed , but it cant set the interface to the specified
network vlan that I mentioned. In the template I have 2 interfaces
configured, both are set at transfer mode. Could this be the reason? The
playbook itself does not throw any error during execution. Any help on this
would be greatly appreciated.
--
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/9492c4dc-a339-4dca-9b06-782da35f247d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.