- name: Get service-types data file
  get_url:
    url: https://service-types.openstack.org/service-types.json
    dest: "{{ ansible_user_dir }}/service-types.json"

- name: Collect service type data for project
  get_service_type_data:
    project_name: "{{ zuul.project.short_name }}"
    service_types_file: "{{ ansible_user_dir }}/service-types.json"
  register: service_type_data

- name: Set service_type_data as a fact
  set_fact:
    service_type_data: service_type_data

- name: Get service-types data file
  get_url:
    url: https://service-types.openstack.org/service-types.json
    dest: /tmp
  register: result

- name: Collect service type data for project
  get_service_type_data:
    project_name: "{{ zuul.project.short_name }}"
    service_types_file: "{{ result.src }}"
  register: service_type_data

- name: Set service_type_data as a fact
  set_fact:
    service_type_data: service_type_data

Use tempfile for get_url task set-service-type-data-fact
Use tempfile for get_url task set-service-type-data-fact

We don't actually collect facts on executor for security reasons,
however we can use the result.src from get_url to get the file info.

Change-Id: I867c013ab7e3883c8b9cdb0d7b06fec854ed3d5a
Signed-off-by: Paul Belanger <e7139c8e6c4ea75cc1c287ce081b2dc0f3ab39ec@redhat.com>
