- name: Ensure we have python3 for indexer include_tasks: "{{ lookup('first_found', params) }}" vars: params: files: - "py3.{{ ansible_distribution }}.{{ ansible_distribution_major_version }}.yaml" - "py3.default.yaml" - name: Put copy scripts on host copy: src: '{{ item }}' dest: '/usr/local/bin/{{ item }}' owner: root group: root mode: '0755' loop: - wheel-index.sh - wheel-copy.sh - wheel-indexer.py become: yes - name: Copy the wheels to AFS command: '/usr/local/bin/wheel-copy.sh {{ wheel_dir }} {{ afs_dir }}' - name: Rebuild top-level mirror index command: '/usr/local/bin/wheel-index.sh {{ afs_dir }}' # With multiple python2/3 builds, we only need one host to generate # the final index. All hosts should be finished copying under # linear strategy. run_once: True