Debian Codegraph @

ansible_collections/community/sops/roles/install/tasks/detect_source.yml

raw
1 ---
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4 # SPDX-FileCopyrightText: 2022, Felix Fontein
5
6 - name: Check whether system packages are a valid source of SOPS {{ sops_version }}
7 when:
8 - _community_sops_install_system_has_system
9 - not (sops_version != 'latest' and _community_sops_install_system_has_system_latest_only)
10 ansible.builtin.set_fact:
11 _community_sops_install_effective_sops_source: system
12
13 - name: Check whether GitHub is a valid source of SOPS
14 when:
15 - _community_sops_install_system_has_github
16 - _community_sops_install_effective_sops_source == 'auto'
17 ansible.builtin.set_fact:
18 _community_sops_install_effective_sops_source: github
19
20 - name: Ensure that something was detected
21 ansible.builtin.fail:
22 msg: >-
23 Was not able to determine installation source for SOPS {{ sops_version }}
24 for {{ _community_sops_install_facts.distribution }} {{ _community_sops_install_facts.distribution_version }}.
25 Please open an issue in https://github.com/ansible-collections/community.sops/issues if you think this should work.
26 when: _community_sops_install_effective_sops_source == 'auto'