---

- name: download job Checkpoint Start
  hosts: "{{ g_download_hosts|default('k8s-cluster:etcd:calico-rr') }}"
  gather_facts: false
  tasks:
  - name: Set download 'In Progress'
    run_once: true
    set_stats:
      data:
        installer_phase_download:
          title: "download resources"
          playbook: "playbooks/download/deploy.yml"
          status: "In Progress"
          start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"

- name: Start to download resources
  hosts: "{{ g_download_hosts|default('k8s-cluster:etcd:calico-rr') }}"
  any_errors_fatal: true
  tasks:
  - import_role:
      name: download
      tasks_from: main.yml

- name: download job Checkpoint End
  hosts: "{{ g_download_hosts|default('k8s-cluster:etcd:calico-rr') }}"
  gather_facts: false
  tasks:
  - name: Set download job 'Complete'
    run_once: true
    set_stats:
      data:
        installer_phase_download:
          status: "Complete"
          end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
