1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/git/tasks/reset-origin.yml

26 lines
703 B
YAML
Raw Normal View History

- 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