# repo_setup Ansible role to generate CentOS Stream 9 and RHEL 9 distribution based Base OS and OpenStack Antelope/Master DLRN yum repos using [repo-setup](https://github.com/openstack-k8s-operators/repo-setup) tool and rhos-release utility. It is used in Production chain pipeline to generate repos for integration and component line. The CentOS Stream and DLRN repos are generated by repo-setup project. It gets installed by repo_setup role using `cifmw_repo_setup_src` role default var. ## Privilege escalation `become` may be set to true if you're deploying the repositories for the system. ## Parameters * `cifmw_repo_setup_basedir`: (String) Installation base directory. Defaults to `cifmw_basedir` which defaults to `~/ci-framework-data`. * `cifmw_repo_setup_venv: (String) repo-setup virtualenv. Defaults to `{{ cifmw_repo_setup_basedir }}/venv/repo-setup`. * `cifmw_repo_setup_promotion`: (String) Promotion line you want to deploy. Defaults to `current-podified`. * `cifmw_repo_setup_branch`: (String) Branch/release you want to deploy. Defaults to `zed`. * `cifmw_repo_setup_dlrn_uri`: (String) DLRN base URI. Defaults to `https://trunk.rdoproject.org/`. * `cifmw_repo_setup_rdo_mirror`: (String) Address from which to install RDO packages. Defaults to `{{ cifmw_repo_setup_dlrn_uri }}`. * `cifmw_repo_setup_os_release`: (String) Operating system release. Defaults to `{{ ansible_distribution|lower }}`. * `cifmw_repo_setup_src`: (String) repo-setup repository location. Takes its value from cifmw_repo_setup_url at group_vars/all.yaml, defaults to `https://github.com/openstack-k8s-operators/repo-setup`. * `cifmw_repo_setup_version`: (string) repo-setup repository version. Takes its value from cifmw_repo_setup_version_pin (from group_vars) if define, defaults to `HEAD`. * `cifmw_repo_setup_output`: (String) Repository files output. Defaults to `{{ cifmw_repo_setup_basedir }}/artifacts/repositories`. * `cifmw_repo_setup_additional_repos`: (String) Additional repos(ceph, deps) to enable. Defaults to `''`. * `cifmw_repo_setup_env`: (Dict) Environment variables to be passed to repo_setup cli . Defaults to `'{}'`. * `cifmw_repo_setup_enable_rhos_release`: (Boolean) Toggle `rhos-release` support. Defaults to `False`. * `cifmw_repo_setup_dlrn_hash_tag`: (String) repo-setup dlrn-hash-tag. Defaults to `{}`. * `cifmw_repo_setup_component_name`: (String) component repo to setup. Used in component lines. Defaults to ''. * `cifmw_repo_setup_component_promotion_tag`: (String) DLRN hash tag to use for component repo setup. Defaults to `component-ci-testing`. ### Optional parameters for rhos-release * `cifmw_repo_setup_rhos_release_rpm`: (String) URL to rhos-release RPM. * `cifmw_repo_setup_rhos_release_args`: (String) Parameters to pass down to `rhos-release`. * `cifmw_repo_setup_rhos_release_gpg_check`: (Bool) Skips the gpg check during rhos-release rpm installation. Defaults to `True`. * `cifmw_repo_setup_rhos_release_path`: (String) The path where the rhos-release rpm is downloaded. Defaults to `{{ cifmw_repo_setup_basedir }}/rhos-release`. ## Notes ### Use repo-setup role with custom DLRN server When we use repo-setup role with custom DLRN server. The server might need custom TLS certificates. Make sure we set `cifmw_repo_setup_env` variable while running repo-setup role. ``` cifmw_repo_setup_env: CURL_CA_BUNDLE: "/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt" ``` ## Examples ### Generate CentOS Stream 9 podified-ci-testing antelope dlrn repos ```yaml --- - hosts: localhost vars: cifmw_repo_setup_promotion: "podified-ci-testing" cifmw_repo_setup_branch: "antelope" cifmw_repo_setup_os_release: centos cifmw_repo_setup_dist_major_version: 9 tasks: - name: Run repo-setup role ansible.builtin.include_role: name: repo_setup ``` ### Generate CentOS Stream 9 baremetal component antelope dlrn repos ```yaml --- - hosts: localhost vars: cifmw_repo_setup_branch: "antelope" cifmw_repo_setup_os_release: centos cifmw_repo_setup_dist_major_version: 9 cifmw_repo_setup_component_name: baremetal tasks: - name: Run repo-setup role ansible.builtin.include_role: name: repo_setup ``` ### Generate RHEL-9 podified-ci-testing osp18 dlrn repos ```yaml - hosts: localhost vars: cifmw_repo_setup_promotion: "podified-ci-testing" cifmw_repo_setup_branch: "osp18" cifmw_repo_setup_os_release: rhel cifmw_repo_setup_dist_major_version: 9 cifmw_repo_setup_dlrn_uri: cifmw_repo_setup_rhos_release_rpm: cifmw_repo_setup_enable_rhos_release: true cifmw_repo_setup_rhos_release_args: "ceph-6.0 -r 9.4" tasks: - name: Run repo-setup role ansible.builtin.include_role: name: repo_setup apply: environment: CURL_CA_BUNDLE: "/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt" ```