I am testing the creation of instances on GCE but cannot get anything to 
work. This is a brand new install of Ansible. Details of the playbook and 
error are below. 

Thanks in advance for the help.

$ ansible-playbook test.yml -vv
———————ERROR————————
PLAY [deploy GCE instances] 
*************************************************** 

TASK: [launch instances] 
****************************************************** 
<localhost> REMOTE_MODULE gce network=gce-it-corp-network 
project_id=wepay-it-01 machine_type=g1-small 
pem_file=/tmp/downloads/pkey.pem image=centos-6 service_account_email= 
zone=us-central1-b name=localhost
failed: [localhost] => {"changed": false, "failed": true}
msg: Unexpected response: {}

FATAL: all hosts have already failed -- aborting

PLAY RECAP 
******************************************************************** 
          to retry, use: --limit @/home/dean/test.retry

localhost                  : ok=0    changed=0    unreachable=0    failed=1


———————PLAYBOOK————————
---
   - name: deploy GCE instances
     hosts: localhost
     connection: local
     gather_facts: no
     vars:
       #needed for libcloud:
       project_id: *redacted*
       service_account_email: *redacted*
       pem_file: /tmp/downloads/pkey.pem

       #instance configuration:
       zone: us-central1-b
       machine_type: g1-small
       image: centos-6
       network_name: gce-it-corp-network

     tasks:
       - name: launch instances
         gce:
           service_account_email: "{{ service_account_email }}"
           pem_file: "{{ pem_file }}"
           project_id: "{{ project_id }}"

           name: "{{ inventory_hostname }}"
           zone: "{{ zone }}"
           machine_type: "{{ machine_type }}"
           image: "{{ image }}"
           network: "{{ network_name }}"
         register: gce_result

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0af70ec9-3483-48b6-8636-ba4734d83543%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to