Files
tripleo-repos/molecule/default/verify_compose_repos.yml
T
Douglas Viroel a34103fffd Improve unit test coverage and molecule verifications
This patch adds more unit test to yum-config module and validations
to molecule verify step.

Change-Id: Icf4cd8463bcc5b466a6b0882e072874639ce117a
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-09-28 09:21:08 -03:00

27 lines
738 B
YAML

---
- name: "Search for {{ item }} repos"
find:
paths: "/etc/yum.repos.d"
file_type: file
use_regex: yes
patterns:
- "^CentOS-Stream.*{{ item }}.*.repo$"
excludes:
- "CentOS-Stream-{{ item }}.repo"
register: compose_repos
failed_when: compose_repos.files|length != 1
- name: Validate repo file configuration
include_tasks: assert_ini_key_value.yml
with_items:
- name: "{{ item }}"
path: "{{ compose_repos.files[0].path }}"
section: "{{ item|lower }}"
key: enabled
value: "1"
- name: "{{ item }}"
path: "/etc/yum.repos.d/CentOS-Stream-{{ item }}.repo"
section: "{{ item|lower }}"
key: enabled
value: "0"