Adrià Vilanova MartÃnez | 77f1b81 | 2023-01-15 17:59:43 +0100 | [diff] [blame] | 1 | - name: Check sourceFile and logFileName are set |
| 2 | when: sourceFile is not defined or logFileName is not defined |
| 3 | fail: |
| 4 | msg: "sourceFile and logFileName must be set" |
| 5 | |
| 6 | - name: Does the file exist |
| 7 | register: stat_log |
| 8 | stat: |
| 9 | path: "{{ sourceFile }}" |
| 10 | |
| 11 | - name: Store on executor |
| 12 | when: stat_log.stat.exists |
| 13 | synchronize: |
| 14 | mode: pull |
| 15 | src: "{{ sourceFile }}" |
| 16 | dest: "{{ zuul.executor.log_root }}/{{ logFileName }}" |
| 17 | verify_host: true |
| 18 | owner: no |
| 19 | group: no |