Merge "Add compose_repos repo operation to 'repo-setup'"
This commit is contained in:
commit
1149b5c0fe
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# Try to setup repos using yum-config module if available
|
||||
use_yum_config_module: true
|
||||
compose_url: "{{ job.centos_compose_url|default('https://odcs.stream.centos.org/production/latest-CentOS-Stream/compose/') }}"
|
||||
|
||||
add_repos:
|
||||
- type: compose_repos
|
||||
compose_url: "{{ compose_url }}"
|
||||
release: centos-stream-9
|
||||
disable_conflicting: true
|
||||
variants:
|
||||
- AppStream
|
||||
- BaseOS
|
||||
- CRB
|
||||
- HighAvailability
|
||||
disable_repos:
|
||||
- quickstart-centos-appstreams.repo
|
||||
- quickstart-centos-base.repo
|
||||
- quickstart-centos-crb.repo
|
||||
- quickstart-centos-highavailability.repo
|
|
@ -109,6 +109,12 @@ repo_cmd_before: |
|
|||
fi
|
||||
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
|
||||
|
||||
# Save environment variables, to be used afterwards
|
||||
echo "export NODEPOOL_CENTOS_MIRROR=${NODEPOOL_CENTOS_MIRROR}" >> {{ repo_setup_env_filepath }}
|
||||
echo "export NODEPOOL_RDO_PROXY=${NODEPOOL_RDO_PROXY}" >> {{ repo_setup_env_filepath }}
|
||||
echo "export RDO_DLRN_REPO=${RDO_DLRN_REPO}" >> {{ repo_setup_env_filepath }}
|
||||
echo "export DLRN_PATH_TAG=${DLRN_PATH_TAG}" >> {{ repo_setup_env_filepath }}
|
||||
|
||||
repos:
|
||||
# RDO repos
|
||||
- type: file
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
set_fact:
|
||||
repo_config_path: "{{ working_dir }}/workspace/.quickstart/config/release/dependency_ci/{{ job.dependency|default(dependency) }}/repo_config.yaml"
|
||||
|
||||
- name: check if we have a depednecy repo_config file
|
||||
- name: check if we have a dependency repo_config file
|
||||
stat:
|
||||
path: "{{ repo_config_path }}"
|
||||
register: repo_config_path_check
|
||||
|
|
|
@ -17,26 +17,9 @@
|
|||
register: result
|
||||
changed_when: true
|
||||
|
||||
- name: Configure 'generic' repos using yum-config module
|
||||
become: true
|
||||
tripleo.repos.yum_config:
|
||||
type: repo
|
||||
name: "{{ item.reponame }}"
|
||||
enabled: "{{ item.enabled|default('true') }}"
|
||||
environment_file: "{{ repo_setup_env_filepath }}"
|
||||
file_path: "/etc/yum.repos.d/{{ item.filename }}"
|
||||
set_options:
|
||||
baseurl: "{{ item.baseurl|default(omit) }}"
|
||||
priority: "{{ item.priority|default(omit) }}"
|
||||
gpgcheck: "{{ item.gpgcheck|default('0') }}"
|
||||
mirrorlist: "{{ item.mirrorlist|default(omit) }}"
|
||||
module_hotfixes: "{{ item.module_hotfixes|default(omit) }}"
|
||||
includepkgs: "{{ item.includepkgs|default(omit) }}"
|
||||
exclude: "{{ item.exclude|default(omit) }}"
|
||||
sslverify: "{{ item.sslverify|default(omit) }}"
|
||||
with_items: "{{ repos + add_repos + job.add_repos|default([]) }}"
|
||||
when:
|
||||
- item.type == 'generic'
|
||||
- include_tasks: yum-config-generic.yml
|
||||
|
||||
- include_tasks: yum-config-compose.yml
|
||||
|
||||
- name: Run commands after repo setup
|
||||
shell: >
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Configure 'compose' repos using yum-config module
|
||||
become: true
|
||||
tripleo.repos.yum_config:
|
||||
type: enable-compose-repos
|
||||
compose_url: "{{ item.compose_url }}"
|
||||
centos_release: "{{ item.release }}"
|
||||
variants: "{{ item.variants|default(omit) }}"
|
||||
disable_conflicting_variants: "{{ item.disable_conflicting|default(false) }}"
|
||||
arch: "{{ item.arch|default(omit) }}"
|
||||
disable_repos: "{{ item.disable_repos|default(omit) }}"
|
||||
with_items: "{{ repos + add_repos + job.add_repos|default([]) }}"
|
||||
when:
|
||||
- item.type == 'compose_repos'
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: Configure 'generic' repos using yum-config module
|
||||
become: true
|
||||
tripleo.repos.yum_config:
|
||||
type: repo
|
||||
name: "{{ item.reponame }}"
|
||||
enabled: "{{ item.enabled|default('true') }}"
|
||||
environment_file: "{{ repo_setup_env_filepath }}"
|
||||
file_path: "/etc/yum.repos.d/{{ item.filename }}"
|
||||
set_options:
|
||||
baseurl: "{{ item.baseurl|default(omit) }}"
|
||||
priority: "{{ item.priority|default(omit) }}"
|
||||
gpgcheck: "{{ item.gpgcheck|default('0') }}"
|
||||
mirrorlist: "{{ item.mirrorlist|default(omit) }}"
|
||||
module_hotfixes: "{{ item.module_hotfixes|default(omit) }}"
|
||||
includepkgs: "{{ item.includepkgs|default(omit) }}"
|
||||
exclude: "{{ item.exclude|default(omit) }}"
|
||||
sslverify: "{{ item.sslverify|default(omit) }}"
|
||||
with_items: "{{ repos + add_repos + job.add_repos|default([]) }}"
|
||||
when:
|
||||
- item.type == 'generic'
|
Loading…
Reference in New Issue