---
- name: check if gold image exists
  hosts: localhost
  tasks:
  - name: check for gold image
    command: gcloud --project {{ gcloud_project }} compute images describe {{ gold_image }}
    register: gold_image_exists
    changed_when: false
    ignore_errors: true

- include: gold-image-include.yaml
  when: hostvars['localhost']['gold_image_exists'] | failed
