title: ansible create gce instance then perform action on it
body: <p>I would like to create a <code>gce instance</code>, then run a set of tasks against it.</p>
  
  <p>I have the following playbook:</p>
  
  <pre><code>- name: Create instances
    hosts: localhost
    tasks:
      - name: Launch instances
        local_action: gce instance_names=queue
                      machine_type=f1-micro
                      image=debian-7
                      zone=europe-west1-a
                      tags=queue
        register: gce
      - name: Wait for SSH to come up
        local_action: wait_for host="{{ item.public_ip }}"
                      port=22
                      delay=10
                      timeout=60
                      state=started
        with_items: "{{ gce.instance_data }}"
  - name: Configure instances
    hosts: launched
    sudo: True
    roles:
      - my_role_1
      - my_role_1
  </code></pre>
  
  <p>the first task (create the instance) works fine, but when it gets to <code>Configure instances</code> I get
  <code>"skipping: no hosts matched"</code></p>
  
  <p>I am basing this playbook from example provided in the <a href="http://docs.ansible.com/gce_module.html" rel="nofollow">docs</a>, and I assumed <code>launched</code> is a variable, but it looks like it is not.</p>
  
  <p>Does anyone know how to do this?</p>