24 lines
869 B
YAML
24 lines
869 B
YAML
---
|
|
####################################################################
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
####################################################################
|
|
|
|
- name: Include OS-specific variables
|
|
include_vars: '{{ ansible_os_family }}.yml'
|
|
when: not ansible_os_family == "Darwin" and not ansible_os_family == "FreeBSD"
|
|
|
|
- name: Install ssh-keygen
|
|
package:
|
|
name: '{{ openssh_client_package_name }}'
|
|
when: not ansible_os_family == "Darwin" and not ansible_os_family == "FreeBSD"
|
|
|
|
- name: Get ssh version
|
|
shell: ssh -Vq 2>&1|sed 's/^.*OpenSSH_\([0-9]\{1,\}\.[0-9]\{1,\}\).*$/\1/'
|
|
register:
|
|
rc_openssh_version_output
|
|
|
|
- name: Set ssh version facts
|
|
set_fact:
|
|
openssh_version: "{{ rc_openssh_version_output.stdout.strip() }}"
|