Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ansible/inventory/group_vars/all/dnf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ dnf_custom_repos: {}
# systems only. Default value is 'false'.
dnf_install_epel: false

# Override the state of repositories. Expected to be used with repositories not
# managed by dnf_custom_repos. For example:
# dnf_repo_state_overrides:
# crb: enabled
# Default value is {}.
dnf_repo_state_overrides: {}

###############################################################################
# DNF Automatic configuration.

Expand Down
21 changes: 12 additions & 9 deletions ansible/inventory/group_vars/all/ipa
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ ipa_builder_source_version: "{{ openstack_branch }}"
ipa_build_dib_host_packages_extra: [ 'zstd' ]

# List of default Diskimage Builder (DIB) elements to use when building IPA
# images. Default is ["centos", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] when os_distribution is "rocky", and
# ["ubuntu", "dynamic-login", "enable-serial-console",
# images. Default is ["rocky-container", "dynamic-login",
# "enable-serial-console", "ironic-python-agent-ramdisk"] when os_distribution
# is "rocky", and ["ubuntu", "dynamic-login", "enable-serial-console",
# "ironic-python-agent-ramdisk"] otherwise.
ipa_build_dib_elements_default:
# TODO(mattcrees): Use {{ os_distribution }} here when Rocky IPA builds work.
- "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}"
- "{{ 'rocky-container' if os_distribution == 'rocky' else os_distribution }}"
- dynamic-login
- enable-serial-console
- ironic-python-agent-ramdisk
- baremetal

# List of additional Diskimage Builder (DIB) elements to use when building IPA
# images. Default is none.
Expand All @@ -48,8 +48,9 @@ ipa_build_dib_elements: >
# Dictionary of default environment variables to provide to Diskimage Builder
# (DIB) during IPA image build.
ipa_build_dib_env_default:
# TODO(mattcrees): Use {{ os_release }} here when Rocky IPA builds work.
DIB_RELEASE: "{{ '9-stream' if os_distribution == 'rocky' else os_release }}"
DIB_RELEASE: "{{ os_release }}"
DIB_CONTAINERFILE_RUNTIME: "{{ container_engine }}"
DIB_CONTAINERFILE_RUNTIME_ROOT: "{{ (container_engine == 'podman') | int }}"
DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_build_source_url }}"
DIB_REPOREF_ironic_python_agent: "{{ ipa_build_source_version }}"
DIB_REPOREF_requirements: "{{ ipa_build_source_version }}"
Expand Down Expand Up @@ -84,8 +85,10 @@ ipa_build_dib_git_elements_extra: []
ipa_build_dib_git_elements: >-
{{ ipa_build_dib_git_elements_default + ipa_build_dib_git_elements_extra }}

# List of DIB packages to install. Default is empty list.
ipa_build_dib_packages: []
# List of DIB packages to install. Default is ["python3-yaml"] when
# when os_distribution is "rocky", otherwise [].
ipa_build_dib_packages: >-
{{ ["python3-yaml"] if os_distribution == 'rocky' else [] }}

# Upper constraints file for installing packages in the virtual environment
# used for building IPA images. Default is {{ pip_upper_constraints_file }}.
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/dnf/tasks/local-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
group: root
mode: 0664
become: True
when: (role_path ~ '/templates/' ~ item ~ '.j2') is exists
loop:
- "{{ repo_file_prefix }}.repo"
- "{{ repo_file_prefix }}-extras.repo"
- "{{ repo_file_prefix }}-addons.repo"
- "{{ repo_file_prefix }}-devel.repo"

- name: Update cache
dnf:
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/dnf/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
when: dnf_use_local_mirror | bool

- import_tasks: custom-repo.yml

- name: Configure repository overrides
become: true
community.general.dnf_config_manager:
name: "{{ item }}"
state: "{{ dnf_repo_state_overrides[item] }}"
# NOTE(wszumski): Ignore repos managed with dnf_custom_repos as enabled state
# is set in definition.
loop: "{{ dnf_repo_state_overrides.keys() | difference(dnf_custom_repos.keys()) }}"
130 changes: 130 additions & 0 deletions ansible/roles/dnf/templates/centos-addons.repo.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
[highavailability]
name=CentOS Stream $releasever - HighAvailability
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/HighAvailability/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[highavailability-debuginfo]
name=CentOS Stream $releasever - HighAvailability - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/HighAvailability/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[highavailability-source]
name=CentOS Stream $releasever - HighAvailability - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/HighAvailability/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[nfv]
name=CentOS Stream $releasever - NFV
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/NFV/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[nfv-debuginfo]
name=CentOS Stream $releasever - NFV - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/NFV/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[nfv-source]
name=CentOS Stream $releasever - NFV - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/NFV/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[rt]
name=CentOS Stream $releasever - RT
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/RT/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[rt-debuginfo]
name=CentOS Stream $releasever - RT - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/RT/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[rt-source]
name=CentOS Stream $releasever - RT - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/RT/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[resilientstorage]
name=CentOS Stream $releasever - ResilientStorage
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/ResilientStorage/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[resilientstorage-debuginfo]
name=CentOS Stream $releasever - ResilientStorage - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/ResilientStorage/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[resilientstorage-source]
name=CentOS Stream $releasever - ResilientStorage - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/ResilientStorage/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[extras-common]
name=CentOS Stream $releasever - Extras packages
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/SIGs/$stream/extras/$basearch/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1

[extras-common-source]
name=CentOS Stream $releasever - Extras packages - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/SIGs/$stream/extras/source/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0
17 changes: 0 additions & 17 deletions ansible/roles/dnf/templates/centos-extras.repo.j2

This file was deleted.

86 changes: 72 additions & 14 deletions ansible/roles/dnf/templates/centos.repo.j2
Original file line number Diff line number Diff line change
@@ -1,25 +1,83 @@
# centos.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.

[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/BaseOS/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
fastestmirror=0

[baseos-debuginfo]
name=CentOS Stream $releasever - BaseOS - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/BaseOS/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[baseos-source]
name=CentOS Stream $releasever - BaseOS - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/BaseOS/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
fastestmirror=0

[appstream-debuginfo]
name=CentOS Stream $releasever - AppStream - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[appstream-source]
name=CentOS Stream $releasever - AppStream - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/AppStream/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[crb]
name=CentOS Stream $releasever - CRB
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/CRB/$basearch/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=0

[crb-debuginfo]
name=CentOS Stream $releasever - CRB - Debug
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/CRB/debug/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0

[crb-source]
name=CentOS Stream $releasever - CRB - Source
baseurl=http://{{ dnf_centos_mirror_host }}/{{ dnf_centos_mirror_directory }}/$stream/CRB/source/tree/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
gpgcheck=1
repo_gpgcheck=0
metadata_expire=6h
enabled=0
Loading
Loading