Debian Codegraph @

ansible_collections/community/sops/tests/integration/targets/role_install_version/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 - name: Show some basic system info
7 debug:
8 msg: |
9 Architecture: {{ ansible_facts.architecture }}
10 OS family: {{ ansible_facts.os_family }}
11 Distribution: {{ ansible_facts.distribution }}
12 Distribution version: {{ ansible_facts.distribution_version }}
13
14 - vars:
15 sops_version_1: "{{ '3.7.3' if ansible_architecture == 'x86_64' else '3.9.2' }}"
16 sops_version_2: "{{ '3.7.0' if ansible_architecture == 'x86_64' else '3.8.1' }}"
17 sops_version_3: 3.8.0-rc.1
18 block:
19 - name: Install sops {{ sops_version_1 }}
20 include_role:
21 name: community.sops.install
22 vars:
23 sops_version: "{{ sops_version_1 }}"
24 sops_github_token: "{{ github_token | default('') | string }}"
25
26 - name: Figure out sops version
27 command:
28 cmd: sops --version
29 register: output
30
31 - name: Check sops version
32 assert:
33 that:
34 - >-
35 ('sops ' ~ sops_version_1) in output.stdout
36
37 - name: Install sops {{ sops_version_2 }}
38 include_role:
39 name: community.sops.install
40 vars:
41 sops_version: "{{ sops_version_2 }}"
42 sops_github_token: "{{ github_token | default('') | string }}"
43
44 - name: Figure out sops version
45 command:
46 cmd: sops --version
47 register: output
48
49 - name: Check sops version
50 assert:
51 that:
52 - >-
53 ('sops ' ~ sops_version_2) in output.stdout
54
55 - name: Install sops {{ sops_version_3 }}
56 include_role:
57 name: community.sops.install
58 vars:
59 sops_version: "{{ sops_version_3 }}"
60 sops_github_token: "{{ github_token | default('') | string }}"
61
62 - name: Figure out sops version
63 command:
64 cmd: sops --version --disable-version-check
65 register: output
66
67 - name: Check sops version
68 assert:
69 that:
70 - >-
71 ('sops ' ~ sops_version_3) == output.stdout