Debian Codegraph @

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

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 ####################################################################
7 # WARNING: These are designed specifically for Ansible tests #
8 # and should not be used as examples of how to write Ansible roles #
9 ####################################################################
10
11 - name: Include OS-specific variables
12 ansible.builtin.include_vars: '{{ ansible_facts.os_family }}.yml'
13 when: not ansible_facts.os_family == "Darwin"
14
15 - name: Install cryptography (Python 3)
16 become: true
17 ansible.builtin.package:
18 name: '{{ cryptography_package_name_python3 }}'
19 when: ansible_facts.os_family != 'Darwin' and ansible_facts.python_version is version('3.0', '>=')
20
21 - name: Install cryptography (Python 2)
22 become: true
23 ansible.builtin.package:
24 name: '{{ cryptography_package_name }}'
25 when: ansible_facts.os_family != 'Darwin' and ansible_facts.python_version is version('3.0', '<')
26
27 - name: Install cryptography (Darwin, and potentially upgrade for other OSes)
28 become: true
29 ansible.builtin.pip:
30 name: cryptography>=3.3.0
31 extra_args: "-c {{ remote_constraints }}"
32
33 - name: Register cryptography version
34 ansible.builtin.command: "{{ ansible_facts.python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
35 register: cryptography_version