Skip to content

Instantly share code, notes, and snippets.

@phips
Last active August 4, 2017 07:52
Show Gist options
  • Save phips/2777a564e10d53824df8 to your computer and use it in GitHub Desktop.
Save phips/2777a564e10d53824df8 to your computer and use it in GitHub Desktop.
vmware + ansible + kickstart
- name: Gather VM facts
vsphere_guest:
vcenter_hostname: vcenter.lan
username: "{{ vcenter_user }}"
password: "{{ vcenter_pass }}"
guest: "{{ name }}"
vmware_guest_facts: yes
register: newvm
tags: mac
- name: Prepare for PXE install
file: >
path=/tftpboot/pxelinux.cfg/01-{{ newvm.ansible_facts.hw_eth0.macaddress_dash }}
src=install
state=link
sudo: yes
tags: mac
# {{ ansible_managed }}
UI vesamenu.c32
prompt 0
timeout 50
ontimeout nodeinst
menu title Linux Node Install
LABEL nodeinst
MENU LABEL ^1) Install Node
KERNEL pxeboot/7/vmlinuz
APPEND initrd=pxeboot/7/initrd.img kssendmac ks=http://ks.lan/bootstrap/ks/7.ks noipv6 ramdisk_size=10240
@minufreelance
Copy link

Hi Phips,

How to use this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment