Created
March 24, 2014 01:42
-
-
Save Kahn/9732765 to your computer and use it in GitHub Desktop.
ansible-vsphere_guest playbook
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
# Note: vcenter_username and vcenter_password are contained in a ansible-vault file create_dev_server-vault.yml | |
- hosts: 127.0.0.1 | |
connection: local | |
user: username | |
sudo: false | |
gather_facts: false | |
serial: 1 | |
vars_files: | |
- create_dev_server-vault.yml | |
tasks: | |
- vsphere_guest: | |
vcenter_hostname: '192.168.1.1' | |
user: '{{ vcenter_username }}' | |
password: '{{ vcenter_password }}' | |
datastore: 'datastore2' | |
esxi_hostname: '192.168.1.1' | |
datacenter: '192.168.1.1' | |
vm_name: 'ansibletest' | |
vm_memory_mb: 2048 | |
vm_num_cpus: 1 | |
vm_notes: 'Provisioned by Ansible' | |
guestosid: 'rhel6_64Guest' | |
power_on: yes | |
vm_extra_config: | |
vcpu.hotadd: 'TRUE' | |
mem.hotadd: 'TRUE' | |
vm_disk: | |
disk1: | |
size_gb: 20 | |
datastore: "datastore2" | |
type: "thin" | |
vm_nic: | |
nic1: | |
type: "e1000" | |
network: "SERVERS" | |
network_type: "standard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment