Debian Codegraph @

test/integration/targets/git/tasks/reset-origin.yml

raw
1 - name: RESET-ORIGIN | Clean up the directories
2 file:
3 state: absent
4 path: "{{ item }}"
5 with_items:
6 - "{{ repo_dir }}/origin"
7 - "{{ checkout_dir }}"
8
9 - name: RESET-ORIGIN | Create a directory
10 file:
11 name: "{{ repo_dir }}/origin"
12 state: directory
13
14 - name: RESET-ORIGIN | Initialise the repo with a file named origin,see github.com/ansible/ansible/pull/22502
15 shell: |
16 set -eEu
17
18 git init
19
20 echo "PR 22502" > origin
21 git add origin
22 git commit -m "PR 22502"
23 args:
24 chdir: "{{ repo_dir }}/origin"
25
26 - name: RESET-ORIGIN | Clone a git repo with file named origin
27 git:
28 repo: "{{ repo_dir }}/origin"
29 dest: "{{ checkout_dir }}"
30 remote: origin
31 update: no
32 register: status