# Playbook woes using vsphere\_guest on Mac OSX

**URL:** <https://forum.ansible.com/t/playbook-woes-using-vsphere-guest-on-mac-osx/18256>\
**Category:** Ansible Project\
**Created:** [May 18, 2015, 11:16pm UTC](https://forum.ansible.com/t/playbook-woes-using-vsphere-guest-on-mac-osx/18256 "2015-05-18T23:16:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![calamity\_man](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@calamity\_man](https://forum.ansible.com/u/calamity_man)\
**Post date:** [May 18, 2015, 11:16pm UTC](https://forum.ansible.com/t/playbook-woes-using-vsphere-guest-on-mac-osx/18256/1 "2015-05-18T23:16:18Z")

</div>

Hello all,

I’ve put together a little playbook to help our IT department deploy VMs using the vsphere\_guest module.

The playbook works great - so long as we’re on a Linux system (running Ansible 1.8), but fails miserably when we try to run it on our MacBooks running OSX 10.10.3, Ansible 1.9.1, and pysphere 0.1.7.

Now that I’m typing this, I suppose the issue could have something to do with the Ansible version mis-match - but that’s something I can test when I get back to the office in the morning.

Anyway, the error I get running the playbook on a Mac is:

failed: [127.0.0.1] =\> {“failed”: true}  
msg: parameters are required together: [‘from\_template’, ‘resource\_pool’, ‘template\_src’]

FATAL: all hosts have already failed – aborting

I’ve tried running it as verbosely as possible looking for clues, but I’m lost … so the playbook is below (I welcome any suggestions for improvement), and thanks in advance!

Playbook:

- hosts: 127.0.0.1  
connection: local  
sudo: false  
gather\_facts: false  
serial: 1

vars\_prompt:

- name: “vcenter\_user”  
prompt: “Enter your vcenter username”  
private: no

- name: “user\_pass”  
prompt: “Enter your vcenter password”  
private: yes

- name: “vm\_hostname”  
prompt: “Enter the hostname for this VM”  
private: no

- name: “vm\_memory”  
prompt: “Memory in MB”  
private: no  
default: “4048”

- name: “vm\_cores”  
prompt: “Number of Cores”  
private: no  
default: “2”

tasks:

- vsphere\_guest:  
vcenter\_hostname: vcenter01.XXXX  
username: “{{ vcenter\_user }}”  
password: “{{ user\_pass }}”  
guest: “{{ vm\_hostname }}”  
cluster: “CYC”  
resource\_pool: “/Resources/XXXX-Default”  
state: powered\_off  
vm\_hw\_version: “vmx-08”  
vm\_extra\_config:  
vcpu.hotadd: no  
mem.hotadd: no  
vm\_disk:  
disk1:  
size\_gb: 60  
type: thick  
datastore: “DataStore03”  
vm\_nic:  
nic1:  
type: e1000  
network: “XXXXX”  
network\_type: standard  
vm\_hardware:  
memory\_mb: “{{ vm\_memory }}”  
num\_cpus: “{{ vm\_cores }}”  
osid: otherLinux64Guest  
scsi: lsi  
esxi:  
datacenter: XXX  
hostname: XXXXX
