From cb36ee65f33c4b9284522d9821f64826849a3d62 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Mon, 3 Jul 2023 17:20:49 +0200 Subject: [PATCH] bit of refactoring tests --- molecule/with_custom_repo/verify.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/molecule/with_custom_repo/verify.yml b/molecule/with_custom_repo/verify.yml index da16de0..947aa4e 100644 --- a/molecule/with_custom_repo/verify.yml +++ b/molecule/with_custom_repo/verify.yml @@ -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'