summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/git/tasks/reset-origin.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/git/tasks/reset-origin.yml')
-rw-r--r--test/integration/targets/git/tasks/reset-origin.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/targets/git/tasks/reset-origin.yml b/test/integration/targets/git/tasks/reset-origin.yml
new file mode 100644
index 0000000..8fddd4b
--- /dev/null
+++ b/test/integration/targets/git/tasks/reset-origin.yml
@@ -0,0 +1,25 @@
+- name: RESET-ORIGIN | Clean up the directories
+ file:
+ state: absent
+ path: "{{ item }}"
+ with_items:
+ - "{{ repo_dir }}/origin"
+ - "{{ checkout_dir }}"
+
+- name: RESET-ORIGIN | Create a directory
+ file:
+ name: "{{ repo_dir }}/origin"
+ state: directory
+
+- name: RESET-ORIGIN | Initialise the repo with a file named origin,see github.com/ansible/ansible/pull/22502
+ shell: git init; echo "PR 22502" > origin; git add origin; git commit -m "PR 22502"
+ args:
+ chdir: "{{ repo_dir }}/origin"
+
+- name: RESET-ORIGIN | Clone a git repo with file named origin
+ git:
+ repo: "{{ repo_dir }}/origin"
+ dest: "{{ checkout_dir }}"
+ remote: origin
+ update: no
+ register: status