Parimal, To use kickstart you first need to present a boot media which is configured to pull the kickstart file See: http://www.centos.org/docs/5/html/5.2/Installation_Guide/s1-kickstart2-howuse.html
You can use ansible to present the VM with such bootable media by launching it in a VLAN with a PXE boot server which will present the media, or by presenting the VM with a CD image with the kickstart file built in. I've gone the CD image route with ansible, you can specify a cd image to boot like this: vsphere_guest: vm_hardware: vm_cdrom: type: "iso" iso_path: "DatastoreName/cd-image.iso" Of course you need to give the vsphere_guest module all other required arguments, but this is the simplest way I've found to kiskstart a vm using ansible. -earl On Tue, Jan 6, 2015 at 4:07 AM, Patel Parimal <parimalj.pat...@gmail.com> wrote: > Hi, > I am newbie to Ansible. > > I have gone through the online documentation and examples for creating new > VM on Ansible Docs - vsphere_guest ( > http://docs.ansible.com/vsphere_guest_module.html). > > I want to automate VM creation and OS installation process using Ansible. > > Currently I have VMWare ESXi available which doesn't support VM cloning, > so I need to create a new VM every time from scratch and install OS(RHEL 6) > into it. > > Is there any way to provide kickstart file URL in Ansible Playbook (for > example, static HTTP URL like http://192.168.0.1/ks/ks.cfg) so after > newly built VM is powered on, OS will be installed into it ? > > Thanks and regards, > Parimal > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/da56aeef-01f0-41f6-8dc9-3cd1bdd138d5%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/da56aeef-01f0-41f6-8dc9-3cd1bdd138d5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABGf5APRF_HeN%3Dgyvh0UGdBP%2BV8AeLsaXZZR1SYX833C17wrkQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.