collection 교체

This commit is contained in:
정훈 변
2024-02-23 16:37:40 +09:00
parent b494779b5b
commit 3fd554eee9
38862 changed files with 220204 additions and 6600073 deletions

View File

@@ -1,4 +1,8 @@
shippable/posix/group1
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
azp/posix/1
needs/root
skip/macos
skip/osx

View File

@@ -1,12 +1,23 @@
---
- when: ansible_distribution == 'Fedora'
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- when:
# Fedora or RHEL >= 8
# This module requires the dnf module which is not available on RHEL 7.
- >
ansible_distribution == 'Fedora'
or (ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'
and ansible_distribution_major_version | int >= 8)
block:
- debug: var=copr_chroot
- name: enable copr project
copr:
host: copr.fedorainfracloud.org
state: enabled
name: '@copr/integration_tests'
chroot: fedora-rawhide-x86_64
name: '{{ copr_fullname }}'
chroot: "{{ copr_chroot }}"
register: result
- name: assert that the copr project was enabled
@@ -17,11 +28,11 @@
- result.info == 'Please note that this repository is not part of the main distribution'
- name: enable copr project
check_mode: yes
check_mode: true
copr:
state: enabled
name: '@copr/integration_tests'
chroot: fedora-rawhide-x86_64
name: '{{ copr_fullname }}'
chroot: '{{ copr_chroot }}'
register: result
- name: assert that the copr project was enabled
@@ -30,10 +41,53 @@
- result is not changed
- result.msg == 'enabled'
- name: Ensure the repo is installed and enabled | slurp
register: result
ansible.builtin.slurp:
src: "{{ copr_repofile }}"
- name: Ensure the repo is installed and enabled
vars:
content: "{{ result.content | b64decode }}"
_baseurl: "{{ 'https://download.copr.fedorainfracloud.org/results/gotmax23/community.general.copr_integration_tests' | regex_escape }}"
baseurl: "{{ content | regex_search('baseurl=' ~ _baseurl) }}"
block:
- ansible.builtin.debug:
var: content
- ansible.builtin.debug:
var: baseurl
- name: Ensure the repo is installed and enabled
ansible.builtin.assert:
that:
- "'enabled=1' in content"
- baseurl | length > 0
- name: Install test package from Copr
when:
# Copr does not build new packages for EOL Fedoras.
- >
not (ansible_distribution == 'Fedora' and
ansible_distribution_major_version | int < 35)
block:
- name: install test package from the copr
ansible.builtin.package:
update_cache: true
name: copr-module-integration-dummy-package
- name: uninstall test package
register: result
ansible.builtin.package:
name: copr-module-integration-dummy-package
state: absent
- name: check uninstall test package
ansible.builtin.assert:
that: result.changed | bool
- name: remove copr project
copr:
state: absent
name: '@copr/integration_tests'
name: '{{ copr_fullname }}'
register: result
- name: assert that the copr project was removed
@@ -42,11 +96,20 @@
- 'result is changed'
- result.msg == 'absent'
- name: Ensure the repo file was removed | stat
register: result
ansible.builtin.stat:
dest: "{{ copr_repofile }}"
- name: Ensure the repo file was removed
ansible.builtin.assert:
that: not result.stat.exists | bool
- name: disable copr project
copr:
state: disabled
name: '@copr/integration_tests'
chroot: fedora-rawhide-x86_64
name: '{{ copr_fullname }}'
chroot: '{{ copr_chroot }}'
register: result
- name: assert that the copr project was disabled
@@ -55,10 +118,37 @@
- 'result is changed'
- result.msg == 'disabled'
- name: Ensure the repo is installed but disabled | slurp
register: result
ansible.builtin.slurp:
src: "{{ copr_repofile }}"
- name: Ensure the repo is installed but disabled
vars:
content: "{{ result.content | b64decode }}"
_baseurl: "{{ 'https://download.copr.fedorainfracloud.org/results/gotmax23/community.general.copr_integration_tests' | regex_escape }}"
baseurl: "{{ content | regex_search('baseurl=' ~ _baseurl) }}"
block:
- ansible.builtin.debug:
var: content
- ansible.builtin.debug:
var: baseurl
- name: Ensure the repo is installed but disabled
ansible.builtin.assert:
that:
- "'enabled=0' in content"
- baseurl | length > 0
always:
- name: clean up
ignore_errors: true
copr:
host: copr.fedorainfracloud.org
state: absent
name: '@copr/integration_tests'
chroot: fedora-rawhide-x86_64
name: '{{ copr_fullname }}'
chroot: '{{ copr_chroot }}'
- name: cleanup test package
ansible.builtin.package:
name: copr-module-integration-dummy-package
state: absent

View File

@@ -0,0 +1,15 @@
# Copyright (c) 2022 Maxwell G <gotmax@e.email>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or
# https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
---
copr_host: copr.fedorainfracloud.org
copr_namespace: gotmax23
copr_name: community.general.copr_integration_tests
copr_fullname: '{{ copr_namespace }}/{{ copr_name }}'
copr_repofile: '/etc/yum.repos.d/_copr:{{ copr_host }}:{{ copr_namespace }}:{{ copr_name }}.repo'
# TODO: Fix chroot autodetection so this isn't necessary
_copr_chroot_fedora: "fedora-rawhide-x86_64"
_copr_chroot_rhelish: "epel-{{ ansible_distribution_major_version }}-x86_64"
copr_chroot: "{{ _copr_chroot_fedora if ansible_distribution == 'Fedora' else _copr_chroot_rhelish }}"