Hi,
I am trying to create a new host using the GCE module but I keep hitting the same user. The credentials I am using do have full access.
Playbook
- name: Create instances
hosts: localhost
tasks: - name: Launch instances
local_action: gce instance_names=dcom
machine_type=n1-highcpu-2
image=backports-debian-7-wheezy
zone=europe-west1-b
metadata=‘{“dc”:“gce”}’
project_id=111111111
pem_file=/opt/ansible/.keys/pkey.pem
service_account_email=XXX@developer.gserviceaccount.com
register: gce
Command run:
ansible-playbook -s -i plugins/inventory/gce.py manifest/master.yml
Error
PLAY [Create instances] *******************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [Launch instances] ******************************************************
failed: [localhost] => {“changed”: false, “failed”: true}
msg: Missing required create instance variable
FATAL: all hosts have already failed – aborting
PLAY RECAP ********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
Any ideas or help would be appreciated.
Thanks
Mark