community.crypto/tests/integration/targets/openssh_keypair/tasks/main.yml

23 lines
744 B
YAML
Raw Normal View History

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