bit of refactoring tests
All checks were successful
test / Linting (push) Successful in 26s
test / Molecule tests (default, ubuntu2004) (push) Successful in 56s
test / Molecule tests (default, debian11) (push) Successful in 1m22s
test / Molecule tests (default, debian12) (push) Successful in 1m22s
test / Molecule tests (default, ubuntu2204) (push) Successful in 55s
test / Molecule tests (with_custom_repo, debian11) (push) Successful in 41s
test / Molecule tests (with_custom_repo, debian12) (push) Successful in 43s
test / Molecule tests (with_custom_repo, ubuntu2004) (push) Successful in 43s
test / Molecule tests (with_custom_repo, ubuntu2204) (push) Successful in 1m4s

This commit is contained in:
Bertrand Lanson 2023-07-03 17:20:49 +02:00
parent d12a59b6ab
commit cb36ee65f3

View File

@ -77,7 +77,6 @@
loop: "{{ find_etc_apt_sources_list_d.files }}"
register: slurp_etc_apt_sources_list_d
- name: "Verify file /etc/apt/sources.list.d/docker.list"
ansible.builtin.assert:
that:
@ -85,7 +84,7 @@
- item.item.pw_name == 'root'
- item.item.gr_name == 'root'
- item.item.mode == '0644'
- "(item.content|b64decode) in ('deb [signed-by=/usr/share/keyrings/docker-archive-keyring.asc] https://download.docker.com/linux/' + (ansible_distribution|lower) + ' ' + ansible_distribution_release + ' stable\\n')"
- "(item.content|b64decode) == ('deb [signed-by=/usr/share/keyrings/docker-archive-keyring.asc] https://download.docker.com/linux/' + (ansible_distribution|lower) + ' ' + ansible_distribution_release + ' stable\\n')"
loop: "{{ slurp_etc_apt_sources_list_d.results }}"
when: (item.item.path | basename | splitext | first) == 'docker'
@ -96,6 +95,6 @@
- item.item.pw_name == 'root'
- item.item.gr_name == 'root'
- item.item.mode == '0644'
- "(item.content|b64decode) in ('deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.asc] https://apt.releases.hashicorp.com ' + ansible_distribution_release + ' main\\n')"
- "(item.content|b64decode) == ('deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.asc] https://apt.releases.hashicorp.com ' + ansible_distribution_release + ' main\\n')"
loop: "{{ slurp_etc_apt_sources_list_d.results }}"
when: (item.item.path | basename | splitext | first) == 'hashicorp'