2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | initial checkout
|
2017-01-06 22:38:53 +00:00
|
|
|
git:
|
|
|
|
repo: "{{ repo_format1 }}"
|
|
|
|
dest: "{{ repo_dir }}/format1"
|
|
|
|
register: git_result
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | verify information about the initial clone
|
2017-01-06 22:38:53 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'before' in git_result"
|
|
|
|
- "'after' in git_result"
|
|
|
|
- "not git_result.before"
|
|
|
|
- "git_result.changed"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | repeated checkout
|
2017-01-06 22:38:53 +00:00
|
|
|
git:
|
|
|
|
repo: "{{ repo_format1 }}"
|
|
|
|
dest: "{{ repo_dir }}/format1"
|
|
|
|
register: git_result2
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | check for tags
|
2017-01-06 22:38:53 +00:00
|
|
|
stat:
|
|
|
|
path: "{{ repo_dir }}/format1/.git/refs/tags"
|
|
|
|
register: tags
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | check for HEAD
|
2017-01-06 22:38:53 +00:00
|
|
|
stat:
|
|
|
|
path: "{{ repo_dir }}/format1/.git/HEAD"
|
|
|
|
register: head
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | assert presence of tags/trunk/branches
|
2017-01-06 22:38:53 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "tags.stat.isdir"
|
|
|
|
- "head.stat.isreg"
|
|
|
|
|
2017-10-13 14:30:15 +00:00
|
|
|
- name: FORMATS | verify on a reclone things are marked unchanged
|
2017-01-06 22:38:53 +00:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not git_result2.changed"
|