Last active
August 4, 2017 07:52
-
-
Save phips/2777a564e10d53824df8 to your computer and use it in GitHub Desktop.
vmware + ansible + kickstart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Phips,
How to use this