update ansible collections sops, docker and debops
All checks were successful
/ build (pull_request) Successful in 28s
/ Ansible Lint (push) Successful in 2m36s
/ Ansible Lint (pull_request) Successful in 2m41s

This commit is contained in:
chris 2026-09-21 22:26:20 +02:00
commit e31ee5e39c
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
910 changed files with 27667 additions and 19786 deletions

View file

@ -5,26 +5,39 @@
- when: sops_installed
block:
- name: Test bad parameter detection (1/2)
- name: Test bad parameter detection (1/3)
set_fact:
sops_bad_input_type: "{{ 'this-is-not: a sops file' | community.sops.decrypt(input_type='foo') }}"
ignore_errors: true
register: sops_bad_input_type
- name: Test bad parameter detection (2/2)
- name: Test bad parameter detection (2/3)
set_fact:
sops_bad_output_type: "{{ 'this-is-not: a sops file' | community.sops.decrypt(output_type=23) }}"
ignore_errors: true
register: sops_bad_output_type
- name: Test bad parameter detection (3/3)
set_fact:
sops_bad_output_type: "{{ 'this-is-not: a sops file' | community.sops.decrypt(sops_binary=42) }}"
ignore_errors: true
register: sops_bad_binary
- assert:
that:
- "sops_bad_input_type is failed"
- "'input_type must be one of' in sops_bad_input_type.msg"
- "'; got \"foo\"' in sops_bad_input_type.msg"
- >-
'input_type must be one of' in sops_bad_input_type.msg
- >-
'; got "foo"' in sops_bad_input_type.msg
- "sops_bad_output_type is failed"
- "'output_type must be one of' in sops_bad_output_type.msg"
- "'; got \"23\"' in sops_bad_output_type.msg"
- >-
'output_type must be one of' in sops_bad_output_type.msg
- >-
'; got "23"' in sops_bad_output_type.msg
- "sops_bad_binary is failed"
- >-
"Error in community.sops.decrypt filter: option sops_binary has invalid value: '42' is not a string and conversion is not allowed" in sops_bad_binary.msg
- name: Test decrypt of non-sops file
set_fact:

View file

@ -46,7 +46,7 @@
that:
- "'sops metadata not found' in load_vars_wrong_file.msg"
- name: Test load_vars with simple file into variable
- name: Test load_vars with simple file into variable (1/3)
community.sops.load_vars:
file: simple.sops.yaml
name: dest_variable
@ -55,10 +55,65 @@
- assert:
that:
- load_vars_simple is success
- "load_vars_simple.ansible_facts == {'dest_variable': {'foo': 'bar'}}"
- >-
ansible_version.full is version('2.21', '>=') or
load_vars_simple.ansible_facts == {'dest_variable': {'foo': 'bar'}}
- >-
ansible_version.full is version('2.21', '<') or
'ansible_facts' not in load_vars_simple
- dest_variable.foo == 'bar'
- foo is undefined
- name: Test load_vars with simple file into variable (2/3)
community.sops.load_vars:
file: simple.sops.yaml
name: dest_variable_2
return_method: facts-only
register: load_vars_simple_2
- assert:
that:
- load_vars_simple_2 is success
- >-
load_vars_simple_2.ansible_facts == {'dest_variable_2': {'foo': 'bar'}}
- ansible_facts.dest_variable_2.foo == 'bar'
- >-
ansible_version.full is version('2.24', '>=') or
dest_variable_2.foo == 'bar'
register: load_vars_simple_2_assert
- name: Show deprecations
debug:
msg: "{{ load_vars_simple_2_assert.deprecations | default([]) }}"
- when: ansible_version.full is version('2.20', '>=') and ansible_version.full is version('2.24', '<')
assert:
that:
- load_vars_simple_2_assert.deprecations | length > 0
- load_vars_simple_2_assert.deprecations | map(attribute='msg') | select('ansible.builtin.regex', 'INJECT_FACTS_AS_VARS') | length > 0
- name: Test load_vars with simple file into variable (3/3)
community.sops.load_vars:
file: simple.sops.yaml
name: dest_variable_3
return_method: vars-only
register: load_vars_simple_3
ignore_errors: true
- when: ansible_version.full is version('2.21', '>=')
assert:
that:
- load_vars_simple_3 is success
- >-
"ansible_facts" not in load_vars_simple_3
- dest_variable_3.foo == 'bar'
- when: ansible_version.full is version('2.21', '<')
assert:
that:
- load_vars_simple_3 is failed
- load_vars_simple_3.msg == "return_method=vars-only requires ansible-core 2.21+"
- name: Test load_vars with empty file
community.sops.load_vars:
file: empty.sops.json
@ -67,7 +122,9 @@
- assert:
that:
- load_vars_empty is success
- load_vars_empty.ansible_facts | length == 0
- >-
ansible_version.full is version('2.21', '>=') or
(load_vars_empty.ansible_facts | length == 0)
- name: Test load_vars with simple file into global namespace
community.sops.load_vars:
@ -77,7 +134,9 @@
- assert:
that:
- load_vars_simple_global is success
- "load_vars_simple_global.ansible_facts == {'foo': 'bar'}"
- >-
ansible_version.full is version('2.21', '>=') or
load_vars_simple_global.ansible_facts == {'foo': 'bar'}
- foo == 'bar'
- name: Test load_vars with expressions ignored

View file

@ -41,12 +41,14 @@
- name: Test simple lookup
set_fact:
sops_success: "{{ lookup('community.sops.sops', 'simple.sops.yaml') }}"
sops_success_2: "{{ lookup('community.sops.sops', 'simple.sops.yaml', sops_binary='sops') }}"
register: sops_lookup_simple
- assert:
that:
- "sops_lookup_simple is success"
- "sops_success == 'foo: bar'"
- "sops_success_2 == 'foo: bar'"
- name: Test extract
set_fact:

View file

@ -6,10 +6,10 @@
- name: Show some basic system info
debug:
msg: |
Architecture: {{ ansible_architecture }}
OS family: {{ ansible_os_family }}
Distribution: {{ ansible_distribution }}
Distribution version: {{ ansible_distribution_version }}
Architecture: {{ ansible_facts.architecture }}
OS family: {{ ansible_facts.os_family }}
Distribution: {{ ansible_facts.distribution }}
Distribution version: {{ ansible_facts.distribution_version }}
- name: Install latest sops
include_role:

View file

@ -6,10 +6,10 @@
- name: Show some basic system info
debug:
msg: |
Architecture: {{ ansible_architecture }}
OS family: {{ ansible_os_family }}
Distribution: {{ ansible_distribution }}
Distribution version: {{ ansible_distribution_version }}
Architecture: {{ ansible_facts.architecture }}
OS family: {{ ansible_facts.os_family }}
Distribution: {{ ansible_facts.distribution }}
Distribution version: {{ ansible_facts.distribution_version }}
- vars:
sops_version_1: "{{ '3.7.3' if ansible_architecture == 'x86_64' else '3.9.2' }}"

View file

@ -6,10 +6,10 @@
- name: Show some basic system info
debug:
msg: |
Architecture: {{ ansible_architecture }}
OS family: {{ ansible_os_family }}
Distribution: {{ ansible_distribution }}
Distribution version: {{ ansible_distribution_version }}
Architecture: {{ ansible_facts.architecture }}
OS family: {{ ansible_facts.os_family }}
Distribution: {{ ansible_facts.distribution }}
Distribution version: {{ ansible_facts.distribution_version }}
- vars:
sops_version_1: "{{ '3.7.3' if ansible_architecture == 'x86_64' else '3.9.2' }}"

View file

@ -3,7 +3,7 @@
# 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
- when: ansible_os_family == "Archlinux"
- when: ansible_facts.os_family == "Archlinux"
block:
- name: ArchLinux specific setup
include_tasks: archlinux.yml

View file

@ -7,4 +7,3 @@
file:
path: "{{ remote_tmp_dir }}"
state: absent
no_log: true

View file

@ -8,7 +8,7 @@
# and should not be used as examples of how to write Ansible roles #
####################################################################
- name: make sure we have the ansible_os_family and ansible_distribution_version facts
- name: make sure we have the ansible_facts.os_family and ansible_facts.distribution_version facts
setup:
gather_subset: distribution
when: ansible_facts == {}
@ -16,5 +16,5 @@
- include_tasks: "{{ lookup('first_found', files)}}"
vars:
files:
- "{{ ansible_os_family | lower }}.yml"
- "{{ ansible_facts.os_family | lower }}.yml"
- "default.yml"

View file

@ -6,10 +6,10 @@
- name: Show some basic system info
debug:
msg: |
Architecture: {{ ansible_architecture }}
OS family: {{ ansible_os_family }}
Distribution: {{ ansible_distribution }}
Distribution version: {{ ansible_distribution_version }}
Architecture: {{ ansible_facts.architecture }}
OS family: {{ ansible_facts.os_family }}
Distribution: {{ ansible_facts.distribution }}
Distribution version: {{ ansible_facts.distribution_version }}
- name: Install SOPS on localhost
include_role:

View file

@ -6,10 +6,10 @@
- name: Show some basic system info
debug:
msg: |
Architecture: {{ ansible_architecture }}
OS family: {{ ansible_os_family }}
Distribution: {{ ansible_distribution }}
Distribution version: {{ ansible_distribution_version }}
Architecture: {{ ansible_facts.architecture }}
OS family: {{ ansible_facts.os_family }}
Distribution: {{ ansible_facts.distribution }}
Distribution version: {{ ansible_facts.distribution_version }}
- name: Test whether sops is installed
command: sops --help