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.
32 lines
757 B
YAML
32 lines
757 B
YAML
8 years ago
|
---
|
||
|
|
||
|
# test for https://github.com/ansible/ansible-modules-core/pull/3386
|
||
|
|
||
|
- name: clone repo
|
||
|
git:
|
||
|
repo: '{{ repo_format1 }}'
|
||
|
dest: '{{ checkout_dir }}'
|
||
|
|
||
|
- name: rename remote to be ambiguous
|
||
|
command: git remote rename origin v0.1 chdir="{{ checkout_dir }}"
|
||
|
|
||
|
- name: switch to HEAD
|
||
|
git:
|
||
|
repo: '{{ repo_format1 }}'
|
||
|
dest: '{{ checkout_dir }}'
|
||
|
remote: v0.1
|
||
|
|
||
|
- name: rev-parse remote HEAD
|
||
|
command: git rev-parse v0.1/HEAD chdir="{{ checkout_dir }}"
|
||
|
register: git_remote_head
|
||
|
|
||
|
- name: rev-parse local HEAD
|
||
|
command: git rev-parse HEAD chdir="{{ checkout_dir }}"
|
||
|
register: git_local_head
|
||
|
|
||
|
- assert:
|
||
|
that: git_remote_head.stdout == git_local_head.stdout
|
||
|
|
||
|
- name: clear checkout_dir
|
||
|
file: state=absent path={{ checkout_dir }}
|