87 lines
3.0 KiB
YAML
87 lines
3.0 KiB
YAML
---
|
|
- name: Converge
|
|
hosts: all
|
|
tasks:
|
|
- name: "Check get_hash"
|
|
tripleo.repos.get_hash:
|
|
release: master
|
|
|
|
- name: "Check get_hash with invalid url"
|
|
tripleo.repos.get_hash:
|
|
release: master
|
|
dlrn_url: 'https://httpbin.org/status/404'
|
|
register: result
|
|
failed_when: result is success
|
|
|
|
- name: "Test disable system repo"
|
|
become: true
|
|
tripleo.repos.yum_config:
|
|
type: repo
|
|
name: "{{ 'rt' if (ansible_distribution_major_version is version(8, '>=')) else 'cr' }}"
|
|
enabled: false
|
|
tags:
|
|
# TODO: fix yum_config to correctly report changed state and uncomment
|
|
# the line below which disables molecule idempotence test.
|
|
- molecule-idempotence-notest
|
|
|
|
- name: "Test create new repo file"
|
|
become: true
|
|
tripleo.repos.yum_config:
|
|
type: repo
|
|
name: "fakerepo"
|
|
# Keep it disabled to not affect any other test
|
|
enabled: false
|
|
file_path: "/etc/yum.repos.d/fake_repo.repo"
|
|
set_options:
|
|
baseurl: "http://fakemirror/fakerepo"
|
|
priority: "10"
|
|
gpgcheck: "0"
|
|
exclude: "fakepkg*"
|
|
tags:
|
|
# TODO: fix yum_config to correctly report changed state and uncomment
|
|
# the line below which disables molecule idempotence test.
|
|
- molecule-idempotence-notest
|
|
|
|
- name: "Test yum-config global config"
|
|
become: true
|
|
tripleo.repos.yum_config:
|
|
type: global
|
|
file_path: "{{ '/etc/dnf/dnf.conf' if (ansible_distribution_major_version is version(8, '>=')) else '/etc/yum.conf' }}"
|
|
set_options:
|
|
skip_if_unavailable: "False"
|
|
fake_conf: "True"
|
|
tags:
|
|
# TODO: fix yum_config to correctly report changed state and uncomment
|
|
# the line below which disables molecule idempotence test.
|
|
- molecule-idempotence-notest
|
|
|
|
- name: "Test yum_config enable-compose-repos"
|
|
become: true
|
|
tripleo.repos.yum_config:
|
|
type: enable-compose-repos
|
|
compose_url: https://composes.centos.org/latest-CentOS-Stream-8/compose/
|
|
centos_release: centos-stream-8
|
|
variants:
|
|
- AppStream
|
|
- BaseOS
|
|
disable_repos:
|
|
- /etc/yum.repos.d/CentOS-Stream-AppStream.repo
|
|
- /etc/yum.repos.d/CentOS-Stream-BaseOS.repo
|
|
tags:
|
|
- molecule-idempotence-notest
|
|
# NOTE: operation available only for CentOS >= 8
|
|
when: ansible_distribution_major_version is version(8, '>=')
|
|
- name: "Test create repo from repo file"
|
|
become: true
|
|
tripleo.repos.yum_config:
|
|
type: repo
|
|
enabled: true
|
|
file_path: "/etc/yum.repos.d/delorean.repo"
|
|
down_url: "https://trunk.rdoproject.org/centos8-master/current-tripleo/delorean.repo"
|
|
set_options:
|
|
priority: "20"
|
|
tags:
|
|
# TODO: fix yum_config to correctly report changed state and uncomment
|
|
# the line below which disables molecule idempotence test.
|
|
- molecule-idempotence-notest
|