-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding OpenSSL/cryptography dependency for integration tests
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dependencies: | ||
- setup_ssh_keygen | ||
- setup_openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/integration/targets/openssh_keypair/tasks/setup_cryptography.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
#################################################################### | ||
# 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 cryptography >= 3.0 available | ||
become: true | ||
pip: | ||
name: cryptography>=3.0 | ||
extra_args: "-c {{ remote_constraints }}" | ||
|
||
- name: Register cryptography version | ||
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'" | ||
register: cryptography_version | ||
|
||
- 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: 0.0 | ||
when: bcrypt_version is not defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters