SF initial configurator | a26c41e | 2022-10-06 13:33:13 +0300 | [diff] [blame] | 1 | --- |
| 2 | - hosts: localhost |
| 3 | tasks: |
| 4 | - block: |
| 5 | - import_role: name=emit-job-header |
| 6 | # We need those tasks to use log-inventory, see: https://review.openstack.org/577674 |
| 7 | - name: Define zuul_info_dir fact |
| 8 | set_fact: |
| 9 | zuul_info_dir: "{{ zuul.executor.log_root }}/zuul-info" |
| 10 | |
| 11 | - name: Ensure Zuul Ansible directory exists |
| 12 | delegate_to: localhost |
| 13 | run_once: true |
| 14 | file: |
| 15 | path: "{{ zuul_info_dir }}" |
| 16 | state: directory |
| 17 | |
| 18 | - name: Define inventory_file fact |
| 19 | set_fact: |
| 20 | inventory_file: "/tmp/{{ zuul.build }}/ansible/inventory.yaml" |
| 21 | |
| 22 | - import_role: name=log-inventory |
| 23 | vars: |
| 24 | zuul_log_url: "https://spfactory.storpool.com/logs" |
| 25 | |
| 26 | - name: Create src directory |
| 27 | command: > |
| 28 | oc --context "{{ zuul.resources['pod'].context }}" |
| 29 | --namespace "{{ zuul.resources['pod'].namespace }}" |
| 30 | exec {{ zuul.resources['pod'].pod }} mkdir src |
| 31 | |
| 32 | - name: Copy src repos to the pod |
| 33 | command: > |
| 34 | oc --context "{{ zuul.resources['pod'].context }}" |
| 35 | --namespace "{{ zuul.resources['pod'].namespace }}" |
| 36 | rsync -q --progress=false |
| 37 | {{ zuul.executor.src_root }}/ |
| 38 | {{ zuul.resources['pod'].pod }}:src/ |
| 39 | no_log: true |