2020-03-09 13:11:34 +00:00
|
|
|
---
|
2020-09-25 06:25:48 +00:00
|
|
|
####################################################################
|
|
|
|
# WARNING: These are designed specifically for Ansible tests #
|
|
|
|
# and should not be used as examples of how to write Ansible roles #
|
|
|
|
####################################################################
|
|
|
|
|
2021-05-23 20:36:55 +00:00
|
|
|
- name: Backend auto-detection test
|
2020-03-09 13:11:34 +00:00
|
|
|
openssh_keypair:
|
2021-05-23 20:36:55 +00:00
|
|
|
path: '{{ output_dir }}/auto_backend_key'
|
|
|
|
state: "{{ item }}"
|
|
|
|
loop: ['present', 'absent']
|
2020-03-09 13:11:34 +00:00
|
|
|
|
2021-05-23 20:36:55 +00:00
|
|
|
- set_fact:
|
|
|
|
backends: ['opensshbin']
|
2020-03-09 13:11:34 +00:00
|
|
|
|
2021-05-23 20:36:55 +00:00
|
|
|
- set_fact:
|
|
|
|
backends: "{{ backends + ['cryptography'] }}"
|
2021-05-10 12:47:01 +00:00
|
|
|
when: cryptography_version.stdout is version('3.0', '>=') and bcrypt_version.stdout is version('3.1.5', '>=')
|
|
|
|
|
2021-05-23 20:36:55 +00:00
|
|
|
- include_tasks: ./impl.yml
|
|
|
|
loop: "{{ backends }}"
|
|
|
|
loop_control:
|
|
|
|
loop_var: backend
|