---
- hosts: all
  tasks:
    - name: Fetch generated artifacts
      ansible.builtin.include_role:
        name: "fetch_doc_artifacts"
      vars:
        fetch_doc_artifacts_name: "{{ doc.0.service_type }}_{{ doc.1.type }}"
        fetch_doc_artifacts_rst_source: "{{ ansible_user_dir }}/{{ doc.0.repository }}/{{ doc.1.rst_location }}"
        fetch_doc_artifacts_doc_type: "{{ doc.1.type }}"
        fetch_doc_artifacts_service: "{{ doc.0.service_type }}"
      loop: "{{ doc_exports_var | subelements('docs') }}"
      loop_control:
        loop_var: "doc"
        label: "{{ doc.0.service_type }}_{{ doc.1.type }}"
