--- - block: - name: Fetch repo/switch to master branch git: repo: "{{ test_repo }}" version: "master" dest: /root/samba-integration-tests - name: Fetching PR git: repo: "{{ test_repo }}" refspec: +pull/{{ test_repo_pr }}/head:pr{{ test_repo_pr }} dest: /root/samba-integration-tests - set_fact: test_repo_branch: "pr{{ test_repo_pr }}" when: test_repo_pr is defined - debug: msg: "Preparing to checkout from test repo: {{ test_repo }}, branch {{test_repo_branch}}" - name: Fetching tests repo git: repo: "{{ test_repo }}" version: "{{ test_repo_branch }}" dest: /root/samba-integration-tests - name: Create a symlink for test-info.yml file file: src: /root/test-info.yml dest: /root/samba-integration-tests/test-info.yml owner: root group: root state: link