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.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
---
|
|
|
|
- name: checkout ssh://git@github.com repo without accept_hostkey (expected fail)
|
|
git:
|
|
repo: '{{ repo_format2 }}'
|
|
dest: '{{ checkout_dir }}'
|
|
ssh_opts: '-o UserKnownHostsFile={{ output_dir }}/known_hosts'
|
|
register: git_result
|
|
ignore_errors: true
|
|
|
|
- assert:
|
|
that:
|
|
- 'git_result.failed'
|
|
|
|
- name: checkout git@github.com repo with accept_hostkey (expected pass)
|
|
git:
|
|
repo: '{{ repo_format2 }}'
|
|
dest: '{{ checkout_dir }}'
|
|
accept_hostkey: true
|
|
key_file: '{{ github_ssh_private_key }}'
|
|
ssh_opts: '-o UserKnownHostsFile={{ output_dir }}/known_hosts'
|
|
register: git_result
|
|
when: github_ssh_private_key is defined
|
|
|
|
- assert:
|
|
that:
|
|
- 'git_result.changed'
|
|
when: github_ssh_private_key is defined
|
|
|
|
- name: clear checkout_dir
|
|
file:
|
|
state: absent
|
|
path: '{{ checkout_dir }}'
|
|
when: github_ssh_private_key is defined
|
|
|
|
- name: checkout ssh://git@github.com repo with accept_hostkey (expected pass)
|
|
git:
|
|
repo: '{{ repo_format3 }}'
|
|
dest: '{{ checkout_dir }}'
|
|
version: 'master'
|
|
accept_hostkey: false # should already have been accepted
|
|
key_file: '{{ github_ssh_private_key }}'
|
|
ssh_opts: '-o UserKnownHostsFile={{ output_dir }}/known_hosts'
|
|
register: git_result
|
|
when: github_ssh_private_key is defined
|
|
|
|
- assert:
|
|
that:
|
|
- 'git_result.changed'
|
|
when: github_ssh_private_key is defined
|