Debian Codegraph @

ansible_collections/community/sops/tests/integration/targets/setup_sops/tasks/install.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 - name: Install SOPS on localhost
15 include_role:
16 name: community.sops.install
17 vars:
18 sops_install_on_localhost: true
19 sops_version: '{{ override_sops_version | default("latest") }}'
20 sops_github_token: "{{ github_token | default('') | string }}"
21
22 - name: Install age on localhost
23 include_role:
24 name: community.sops._install_age
25 vars:
26 sops_install_on_localhost: true
27
28 - name: Get temporary filename for SOPS test GPG key
29 ansible.builtin.tempfile:
30 prefix: sops-functional-tests-key.
31 suffix: .asc
32 register: _tempfile
33 delegate_to: localhost
34
35 - name: Download SOPS test GPG key on localhost
36 get_url:
37 headers:
38 Accept: application/vnd.github+json
39 Authorization: "{{ ('Bearer ' ~ github_token) if github_token is defined and github_token else '' }}"
40 url: https://raw.githubusercontent.com/getsops/sops/master/pgp/sops_functional_tests_key.asc
41 dest: "{{ _tempfile.path }}"
42 force: true
43 delegate_to: localhost
44
45 - name: Import SOPS test GPG key on localhost
46 command: gpg --import {{ _tempfile.path | ansible.builtin.quote }}
47 failed_when: false
48 delegate_to: localhost
49
50 # ---------------------------------------------------------------------------
51
52 - name: Install SOPS on remote
53 include_role:
54 name: community.sops.install
55 vars:
56 sops_version: '{{ override_sops_version | default("latest") }}'
57 sops_github_token: "{{ github_token | default('') | string }}"
58
59 - name: Install age on remote
60 include_role:
61 name: community.sops._install_age
62
63 - name: Get temporary filename for SOPS test GPG key
64 ansible.builtin.tempfile:
65 prefix: sops-functional-tests-key.
66 suffix: .asc
67 register: _tempfile
68
69 - name: Download SOPS test GPG key on remote
70 get_url:
71 headers:
72 Accept: application/vnd.github+json
73 Authorization: "{{ ('Bearer ' ~ github_token) if github_token is defined and github_token else '' }}"
74 url: https://raw.githubusercontent.com/getsops/sops/master/pgp/sops_functional_tests_key.asc
75 dest: "{{ _tempfile.path }}"
76 force: true
77
78 - name: Import SOPS test GPG key on remote
79 command: gpg --import {{ _tempfile.path | ansible.builtin.quote }}
80 failed_when: false