- hosts: all tasks: - name: Write a test file copy: content: "Test file" dest: "/tmp/test-output.txt" - name: Write a second test file copy: content: "Second test file" dest: "/tmp/test-output.something.log" - name: Test stage-output with explicit files include_role: name: stage-output vars: zuul_copy_output: /tmp/test-output.txt: logs /tmp/test-output.something.log: logs extensions_to_txt: log: true txt: false - name: Check the file was renamed stat: path: /home/zuul/logs/test-output.something_log.txt register: renamed_file_stat - name: Fail if file was not renamed fail: msg: "Renamed test-output log file does not exist." when: not renamed_file_stat.stat.exists - name: Test stage-output with no input include_role: name: stage-output - name: Remove sudo include_role: name: revoke-sudo - name: Test stage-output without sudo include_role: name: stage-output