mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-03-27 13:53:24 +00:00
74 lines
3.2 KiB
YAML
74 lines
3.2 KiB
YAML
---
|
|
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
- name: Gather facts on controller
|
|
ansible.builtin.setup:
|
|
gather_subset: '!all'
|
|
delegate_to: localhost
|
|
delegate_facts: true
|
|
run_once: true
|
|
- name: Show variables
|
|
ansible.builtin.debug:
|
|
msg: |-
|
|
Target:
|
|
Python: {{ ansible_facts.python.version.major ~ '.' ~ ansible_facts.python.version.minor }}
|
|
OS family: {{ ansible_facts.os_family }}
|
|
Distribution: {{ ansible_facts.distribution }}
|
|
Distribution version: {{ ansible_facts.distribution_version | internal__get_major_minor_version }}
|
|
Distribution major version: {{ ansible_facts.distribution_major_version }}
|
|
|
|
Controller:
|
|
Python: {{ hostvars['localhost'].ansible_facts.python.version.major ~ '.' ~ hostvars['localhost'].ansible_facts.python.version.minor }}
|
|
OS family: {{ hostvars['localhost'].ansible_facts.os_family }}
|
|
Distribution: {{ hostvars['localhost'].ansible_facts.distribution }}
|
|
Distribution version: {{ hostvars['localhost'].ansible_facts.distribution_version | internal__get_major_minor_version }}
|
|
Distribution major version: {{ hostvars['localhost'].ansible_facts.distribution_major_version }}
|
|
- name: Record information
|
|
ansible.builtin.set_fact:
|
|
target_system_python: >-
|
|
{{
|
|
system_python_version_data |
|
|
internal__version_lookup(
|
|
ansible_facts.distribution,
|
|
ansible_facts.os_family,
|
|
ansible_facts.distribution_version,
|
|
ansible_facts.distribution_major_version,
|
|
ansible_facts.python.version.major ~ '.' ~ ansible_facts.python.version.minor
|
|
)
|
|
}}
|
|
target_system_python_cannot_upgrade_cryptography: >-
|
|
{{
|
|
cannot_upgrade_cryptography |
|
|
internal__version_lookup(
|
|
ansible_facts.distribution,
|
|
ansible_facts.os_family,
|
|
ansible_facts.distribution_version,
|
|
ansible_facts.distribution_major_version,
|
|
ansible_facts.python.version.major ~ '.' ~ ansible_facts.python.version.minor
|
|
)
|
|
}}
|
|
controller_system_python: >-
|
|
{{
|
|
system_python_version_data |
|
|
internal__version_lookup(
|
|
hostvars['localhost'].ansible_facts.distribution,
|
|
hostvars['localhost'].ansible_facts.os_family,
|
|
hostvars['localhost'].ansible_facts.distribution_version,
|
|
hostvars['localhost'].ansible_facts.distribution_major_version,
|
|
hostvars['localhost'].ansible_facts.python.version.major ~ '.' ~ hostvars['localhost'].ansible_facts.python.version.minor
|
|
)
|
|
}}
|
|
controller_system_python_cannot_upgrade_cryptography: >-
|
|
{{
|
|
cannot_upgrade_cryptography |
|
|
internal__version_lookup(
|
|
hostvars['localhost'].ansible_facts.distribution,
|
|
hostvars['localhost'].ansible_facts.os_family,
|
|
hostvars['localhost'].ansible_facts.distribution_version,
|
|
hostvars['localhost'].ansible_facts.distribution_major_version,
|
|
hostvars['localhost'].ansible_facts.python.version.major ~ '.' ~ hostvars['localhost'].ansible_facts.python.version.minor
|
|
)
|
|
}}
|