mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
- name: FORMATS | initial checkout
|
|
git:
|
|
repo: "{{ repo_format1 }}"
|
|
dest: "{{ repo_dir }}/format1"
|
|
register: git_result
|
|
|
|
- name: FORMATS | verify information about the initial clone
|
|
assert:
|
|
that:
|
|
- "'before' in git_result"
|
|
- "'after' in git_result"
|
|
- "not git_result.before"
|
|
- "git_result.changed"
|
|
|
|
- name: FORMATS | repeated checkout
|
|
git:
|
|
repo: "{{ repo_format1 }}"
|
|
dest: "{{ repo_dir }}/format1"
|
|
register: git_result2
|
|
|
|
- name: FORMATS | check for tags
|
|
stat:
|
|
path: "{{ repo_dir }}/format1/.git/refs/tags"
|
|
register: tags
|
|
|
|
- name: FORMATS | check for HEAD
|
|
stat:
|
|
path: "{{ repo_dir }}/format1/.git/HEAD"
|
|
register: head
|
|
|
|
- name: FORMATS | assert presence of tags/trunk/branches
|
|
assert:
|
|
that:
|
|
- "tags.stat.isdir"
|
|
- "head.stat.isreg"
|
|
|
|
- name: FORMATS | verify on a reclone things are marked unchanged
|
|
assert:
|
|
that:
|
|
- "not git_result2.changed"
|
|
|
|
- name: FORMATS | check for sensitive information in repo
|
|
git:
|
|
repo: "{{ repo_format4 }}"
|
|
dest: "{{ repo_dir }}/format4"
|
|
register: format4
|
|
ignore_errors: yes
|
|
|
|
- name: FORMATS | assert absence of repo
|
|
assert:
|
|
that:
|
|
- not format4.changed
|
|
- "'********@https' in format4.stderr"
|