2017-10-13 14:30:15 +00:00
|
|
|
- name: RESET-ORIGIN | Clean up the directories
|
2017-03-28 12:41:25 +00:00
|
|
|
file:
|
|
|
|
state: absent
|
|
|
|
path: "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
- "{{ repo_dir }}/origin"
|
|
|
|
- "{{ checkout_dir }}"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: RESET-ORIGIN | Create a directory
|
2017-03-28 12:41:25 +00:00
|
|
|
file:
|
|
|
|
name: "{{ repo_dir }}/origin"
|
|
|
|
state: directory
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: RESET-ORIGIN | Initialise the repo with a file named origin,see github.com/ansible/ansible/pull/22502
|
2017-03-28 12:41:25 +00:00
|
|
|
shell: git init; echo "PR 22502" > origin; git add origin; git commit -m "PR 22502"
|
|
|
|
args:
|
|
|
|
chdir: "{{ repo_dir }}/origin"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: RESET-ORIGIN | Clone a git repo with file named origin
|
2017-03-28 12:41:25 +00:00
|
|
|
git:
|
|
|
|
repo: "{{ repo_dir }}/origin"
|
|
|
|
dest: "{{ checkout_dir }}"
|
|
|
|
remote: origin
|
|
|
|
update: no
|
|
|
|
register: status
|