48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
tasks:
|
|
- name: Check if RT or CR repos are disabled
|
|
vars:
|
|
section_name: "{{ 'rt' if (ansible_distribution_major_version is version(8, '>=')) else 'cr' }}"
|
|
repo_path: /etc/yum.repos.d/CentOS-{{ 'Stream-RealTime' if (ansible_distribution_major_version is version(8, '>=')) else 'CR' }}.repo
|
|
include_tasks: assert_ini_key_value.yml
|
|
with_items:
|
|
- name: "{{ section_name|upper }}"
|
|
path: "{{ repo_path }}"
|
|
section: "{{ section_name }}"
|
|
key: enabled
|
|
value: "0"
|
|
|
|
- name: Check if yum/dnf conf file was updated
|
|
vars:
|
|
conf_file_path: "{{ '/etc/dnf/dnf.conf' if (ansible_distribution_major_version is version(8, '>=')) else '/etc/yum.conf' }}"
|
|
include_tasks: assert_ini_key_value.yml
|
|
with_items:
|
|
- name: global_conf
|
|
path: "{{ conf_file_path }}"
|
|
section: main
|
|
key: skip_if_unavailable
|
|
value: "False"
|
|
- name: global_conf
|
|
path: "{{ conf_file_path }}"
|
|
section: main
|
|
key: fake_conf
|
|
value: "True"
|
|
|
|
- name: Validate compose repos outputs
|
|
include_tasks: verify_compose_repos.yml
|
|
with_items:
|
|
- "AppStream"
|
|
- "BaseOS"
|
|
# NOTE: operation available only for CentOS >= 8
|
|
when: ansible_distribution_major_version is version(8, '>=')
|
|
- name: Check if 'priority' was set to 20 in 'delorean-component-compute'
|
|
include_tasks: assert_ini_key_value.yml
|
|
with_items:
|
|
- name: "delorean-component-compute"
|
|
path: "/etc/yum.repos.d/delorean.repo"
|
|
section: "delorean-component-compute"
|
|
key: priority
|
|
value: "20"
|