Remove support for deprecated Yum variables

The variables in yum.yml and yum-cron.yml were deprecated in Ussuri.
This patch removes them, and updates the defaults in dnf.yml.

Story: 2008160
Task: 40906

Change-Id: I97cc98dd2ff726e5885fefcab17f17796d9fd453
This commit is contained in:
Mark Goddard 2020-09-17 14:20:02 +01:00 committed by Pierre Riteau
parent 7d4d48b1c4
commit 26cea075f2
8 changed files with 23 additions and 125 deletions

View File

@ -1,27 +1,24 @@
--- ---
# NOTE(mgoddard): Use Yum configuration for defaults for backwards
# compatibility.
# Yum configuration. Dict mapping Yum config option names to their values. # Yum configuration. Dict mapping Yum config option names to their values.
# dnf_config: # dnf_config:
# proxy: http://proxy.example.com # proxy: http://proxy.example.com
dnf_config: "{{ yum_config }}" dnf_config: {}
# Whether or not to use a local Yum mirror. Default value is 'false'. # Whether or not to use a local Yum mirror. Default value is 'false'.
dnf_use_local_mirror: "{{ yum_use_local_mirror }}" dnf_use_local_mirror: false
# Mirror FQDN for Yum repos. Default value is 'mirror.centos.org'. # Mirror FQDN for Yum repos. Default value is 'mirror.centos.org'.
dnf_centos_mirror_host: "{{ yum_centos_mirror_host }}" dnf_centos_mirror_host: 'mirror.centos.org'
# Mirror directory for Yum CentOS repos. Default value is 'centos'. # Mirror directory for Yum CentOS repos. Default value is 'centos'.
dnf_centos_mirror_directory: "{{ yum_centos_mirror_directory }}" dnf_centos_mirror_directory: 'centos'
# Mirror FQDN for Yum EPEL repos. Default value is # Mirror FQDN for Yum EPEL repos. Default value is
# 'download.fedoraproject.org'. # 'download.fedoraproject.org'.
dnf_epel_mirror_host: "{{ yum_epel_mirror_host }}" dnf_epel_mirror_host: 'download.fedoraproject.org'
# Mirror directory for Yum EPEL repos. Default value is 'pub/epel'. # Mirror directory for Yum EPEL repos. Default value is 'pub/epel'.
dnf_epel_mirror_directory: "{{ yum_epel_mirror_directory }}" dnf_epel_mirror_directory: 'pub/epel'
# A dict of custom repositories. # A dict of custom repositories.
# You can see params on # You can see params on
@ -33,20 +30,18 @@ dnf_epel_mirror_directory: "{{ yum_epel_mirror_directory }}"
# file: myrepo # file: myrepo
# gpgkey: http://gpgkey # gpgkey: http://gpgkey
# gpgcheck: yes # gpgcheck: yes
dnf_custom_repos: "{{ yum_custom_repos }}" dnf_custom_repos: {}
# Whether to install the epel-release package. This affects RedHat-based # Whether to install the epel-release package. This affects RedHat-based
# systems only. Default value is 'true'. # systems only. Default value is 'true'.
dnf_install_epel: "{{ yum_install_epel }}" dnf_install_epel: true
############################################################################### ###############################################################################
# DNF Automatic configuration. # DNF Automatic configuration.
# Whether DNF Automatic is enabled. This can be used to regularly apply # Whether DNF Automatic is enabled. This can be used to regularly apply
# security updates. Default value is 'false'. # security updates. Default value is 'false'.
dnf_automatic_enabled: "{{ yum_cron_enabled }}" dnf_automatic_enabled: false
# DNF Automatic upgrade type. Default value is 'security'. Note that the # DNF Automatic upgrade type. Default value is 'security'.
# equivalent yum-cron variable is named slightly differently - dnf_automatic_upgrade_type: 'security'
# yum_automatic_update_cmd.
dnf_automatic_upgrade_type: "{{ yum_cron_update_cmd }}"

View File

@ -1,36 +0,0 @@
---
# Yum configuration. Dict mapping Yum config option names to their values.
# yum_config:
# proxy: http://proxy.example.com
yum_config: {}
# Whether or not to use a local Yum mirror.
yum_use_local_mirror: false
# Mirror FQDN for Yum repos.
yum_centos_mirror_host: 'mirror.centos.org'
# Mirror directory for Yum CentOS repos.
yum_centos_mirror_directory: 'centos'
# Mirror FQDN for Yum EPEL repos.
yum_epel_mirror_host: 'download.fedoraproject.org'
# Mirror directory for Yum EPEL repos.
yum_epel_mirror_directory: 'pub/epel'
# A dict of custom repositories.
# You can see params on
# http://docs.ansible.com/ansible/latest/modules/yum_repository_module.html.
# For example:
# yum_custom_repos:
# reponame:
# baseurl: http://repo
# file: myrepo
# gpgkey: http://gpgkey
# gpgcheck: yes
yum_custom_repos: {}
# Whether to install the epel-release package. This affects RedHat-based
# systems only.
yum_install_epel: true

View File

@ -1,6 +0,0 @@
---
# Whether to enable Yum automatic updates.
yum_cron_enabled: false
# Command to use for Yum automatic updates.
yum_cron_update_cmd: 'security'

View File

@ -208,9 +208,7 @@ Package Repositories
| ``dnf`` | ``dnf``
Kayobe supports configuration of package repositories via DNF, via variables in Kayobe supports configuration of package repositories via DNF, via variables in
``${KAYOBE_CONFIG_PATH}/dnf.yml``. For backwards compatibility, all variables ``${KAYOBE_CONFIG_PATH}/dnf.yml``.
in this section starting with ``dnf_`` default to the equivalently named Yum
variable starting with ``yum_``.
Configuration of dnf.conf Configuration of dnf.conf
------------------------- -------------------------

View File

@ -4,10 +4,6 @@
############################################################################### ###############################################################################
# DNF repository configuration. # DNF repository configuration.
# For backwards compatibility, all variables in this section default to the
# equivalently named variables starting with 'yum_' instead of 'dnf_'.
# The yum variables will be removed in a future release.
# Yum configuration. Dict mapping Yum config option names to their values. # Yum configuration. Dict mapping Yum config option names to their values.
# dnf_config: # dnf_config:
# proxy: http://proxy.example.com # proxy: http://proxy.example.com
@ -48,18 +44,11 @@
############################################################################### ###############################################################################
# DNF Automatic configuration. # DNF Automatic configuration.
# For backwards compatibility, all variables in this section default to the
# equivalently named variables starting with 'yum_cron' instead of
# 'dnf_automatic'. # The yum-cron variables will be removed in a future
# release.
# Whether DNF Automatic is enabled. This can be used to regularly apply # Whether DNF Automatic is enabled. This can be used to regularly apply
# security updates. Default value is 'false'. # security updates. Default value is 'false'.
#dnf_automatic_enabled: #dnf_automatic_enabled:
# DNF Automatic upgrade type. Default value is 'security'. Note that the # DNF Automatic upgrade type. Default value is 'security'.
# equivalent yum-cron variable is named slightly differently -
# 'yum_cron_update_cmd'.
#dnf_automatic_upgrade_type: #dnf_automatic_upgrade_type:
############################################################################### ###############################################################################

View File

@ -1,12 +0,0 @@
---
# DEPRECATED: Variables in this file are deprecated and will be removed in a
# future release. Please use dnf.yml instead.
# Whether to enable Yum automatic updates.
#yum_cron_enabled: false
# Command to use for Yum automatic updates.
#yum_cron_update_cmd: 'security'
###############################################################################
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes

View File

@ -1,40 +0,0 @@
---
# DEPRECATED: Variables in this file are deprecated and will be removed in a
# future release. Please use dnf.yml instead.
# Yum configuration. Dict mapping Yum config option names to their values.
# yum_config:
# proxy: http://proxy.example.com
#yum_config:
# Whether or not to use a local Yum mirror.
#yum_use_local_mirror: false
# Mirror FQDN for Yum repos.
#yum_centos_mirror_host: 'mirror.centos.org'
# Mirror directory for Yum CentOS repos.
#yum_centos_mirror_directory: 'centos'
# Mirror FQDN for Yum EPEL repos.
#yum_epel_mirror_host: 'download.fedoraproject.org'
# Mirror directory for Yum EPEL repos.
#yum_epel_mirror_directory: 'pub/epel'
# A dict of custom repositories.
# You can see params on
# http://docs.ansible.com/ansible/latest/modules/yum_repository_module.html.
# For example:
# yum_custom_repos:
# reponame:
# baseurl: http://repo
# file: myrepo
# gpgkey: http://gpgkey
# gpgcheck: yes
#yum_custom_repos:
# Whether to install the epel-release package. This affects RedHat-based
# systems only.
#yum_install_epel:
###############################################################################
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes

View File

@ -0,0 +1,10 @@
---
upgrade:
- |
The Yum configuration variables in ``yum.yml`` which were deprecated in the
Ussuri release have been removed. Adapt any configuration overrides to use
the DNF variables in ``dnf.yml`` instead.
- |
The yum-cron configuration variables in ``yum-cron.yml`` which were
deprecated in the Ussuri release have been removed. Adapt any configuration
overrides to use the DNF Automatic variables in ``dnf.yml``.