mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
openssh_keypair - Adding backend option and refactoring backend code (#236)
* Refactoring openssh_keypair for multiple backends * Fixing cryptography backend validations * Simplifying conditionals and excess variable assignments * Fixing docs and adding cleanup for integration tests * Fixing docs and public key validation bugs in crypto backend * Enhancing cryptogagraphy utils to raise OpenSSHErrors when file not found * Adding missed copyright and cleanup for idempotency test keys * Fixing doc style * Readding crypto/openssh for backwards compatibility * Adding changelog fragment and final simplifications of conditional statements * Applied initial review suggestions
This commit is contained in:
3
tests/integration/targets/setup_bcrypt/meta/main.yml
Normal file
3
tests/integration/targets/setup_bcrypt/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
dependencies:
|
||||
- setup_remote_constraints
|
||||
- setup_pkg_mgr
|
||||
24
tests/integration/targets/setup_bcrypt/tasks/main.yml
Normal file
24
tests/integration/targets/setup_bcrypt/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
####################################################################
|
||||
# WARNING: These are designed specifically for Ansible tests #
|
||||
# and should not be used as examples of how to write Ansible roles #
|
||||
####################################################################
|
||||
|
||||
- name: Attempt to install dependencies for OpenSSH > 7.8
|
||||
block:
|
||||
- name: Ensure bcrypt 3.1.5 available
|
||||
become: true
|
||||
pip:
|
||||
name: bcrypt==3.1.5
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
|
||||
- name: Register bcrypt version
|
||||
command: "{{ ansible_python.executable }} -c 'import bcrypt; print(bcrypt.__version__)'"
|
||||
register: bcrypt_version
|
||||
ignore_errors: true
|
||||
|
||||
- name: Ensure bcrypt_version is defined
|
||||
set_fact:
|
||||
bcrypt_version:
|
||||
stdout: 0.0
|
||||
when: bcrypt_version is not defined
|
||||
Reference in New Issue
Block a user