mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 21:33:00 +00:00
* Add gpg_fingerprint lookup. * Work around problems on some CI targets. * Use get_bin_path to find the gpg executable. Document that we need it. * Improve and test error handling. * Refactor (potentially) common code to module_utils and plugin_utils. This will be useful to create a filter version of this, and further lookups, filters, and modules. * Do not create a keyring when there isn't one. * Fixups. * Fix description. * More fixes for lookup. * Also add a gpg_fingerprint filter. * Improve formulation. Co-authored-by: Sandra McCann <samccann@redhat.com> --------- Co-authored-by: Sandra McCann <samccann@redhat.com>
31 lines
1.1 KiB
YAML
31 lines
1.1 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: Print distribution specific data
|
|
ansible.builtin.debug:
|
|
msg: |
|
|
Distribution: {{ ansible_facts.distribution }}
|
|
Distribution version: {{ ansible_facts.distribution_version }}
|
|
Distribution major version: {{ ansible_facts.distribution_major_version }}
|
|
OS family: {{ ansible_facts.os_family }}
|
|
|
|
- name: Include distribution specific variables
|
|
ansible.builtin.include_vars: '{{ lookup("ansible.builtin.first_found", params) }}'
|
|
vars:
|
|
params:
|
|
files:
|
|
- '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_version }}.yml'
|
|
- '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml'
|
|
- '{{ ansible_facts.distribution }}.yml'
|
|
- '{{ ansible_facts.os_family }}.yml'
|
|
- default.yml
|
|
paths:
|
|
- '{{ role_path }}/vars'
|
|
|
|
- name: Install GnuPG
|
|
ansible.builtin.package:
|
|
name: '{{ gnupg_package_name }}'
|
|
when: has_gnupg
|