Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/setup_openssl/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # Copyright (c) Ansible Project
8 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
9 # SPDX-License-Identifier: GPL-3.0-or-later
10
11 - name: Include OS-specific variables
12 include_vars: '{{ lookup("first_found", search) }}'
13 vars:
14 search:
15 files:
16 - '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml'
17 - '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_version }}.yml'
18 - '{{ ansible_facts.distribution }}.yml'
19 - '{{ ansible_facts.os_family }}.yml'
20 - default.yml
21 paths:
22 - vars
23
24 - name: Install OpenSSL
25 become: true
26 package:
27 name: '{{ openssl_package_name }}'
28 when: not ansible_facts.os_family == 'Darwin'
29
30 - name: Install cryptography
31 become: true
32 package:
33 name: '{{ cryptography_package_name_python3 }}'
34 when: not cryptography_from_pip
35
36 - name: Install cryptography (pip)
37 become: true
38 pip:
39 name: cryptography>=3.3
40 extra_args: "-c {{ remote_constraints }}"
41 when: cryptography_from_pip
42
43 - name: Install pyOpenSSL
44 become: true
45 package:
46 name: '{{ pyopenssl_package_name_python3 }}'
47 when: pyopenssl_package_name_python3 is defined
48
49 - name: register openssl version
50 shell: "openssl version | cut -d' ' -f2"
51 register: openssl_version
52
53 - name: register cryptography version
54 command: "{{ ansible_facts.python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
55 register: cryptography_version