Support configuration of yum.conf
Options are configured via the 'yum_config' variable. Change-Id: Iaf46dbf22e0ad2b9e43926e899ce454d19662cc3 Story: 2004935 Task: 29327
This commit is contained in:
parent
29c0ad98c0
commit
a92684fb14
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
# 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.
|
# Whether or not to use a local Yum mirror.
|
||||||
yum_use_local_mirror: false
|
yum_use_local_mirror: false
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Replace | Disable YUM fastestmirror plugin (CentOS)
|
- name: Replace | Disable YUM fastestmirror plugin (CentOS)
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/yum/pluginconf.d/fastestmirror.conf
|
dest: /etc/yum/pluginconf.d/fastestmirror.conf
|
@ -1,6 +1,15 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: redhat.yml
|
- name: Ensure yum.conf configuration exists
|
||||||
|
ini_file:
|
||||||
|
path: /etc/yum.conf
|
||||||
|
section: "main"
|
||||||
|
option: "{{ item.key }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
|
loop: "{{ query('dict', yum_config) }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- include_tasks: local-mirror.yml
|
||||||
when: yum_use_local_mirror | bool
|
when: yum_use_local_mirror | bool
|
||||||
|
|
||||||
- include_tasks: custom_repo.yml
|
- include_tasks: custom_repo.yml
|
||||||
|
@ -176,6 +176,19 @@ Package Repositories
|
|||||||
Kayobe supports configuration of package repositories via Yum, via variables in
|
Kayobe supports configuration of package repositories via Yum, via variables in
|
||||||
``${KAYOBE_CONFIG_PATH}/yum.yml``.
|
``${KAYOBE_CONFIG_PATH}/yum.yml``.
|
||||||
|
|
||||||
|
Configuration of yum.conf
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Global configuration of Yum is stored in ``/etc/yum.conf``, and options can be
|
||||||
|
set via the ``yum_config`` variable. Options are added to the ``[main]``
|
||||||
|
section of the file. For example, to configure Yum to use a proxy server:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
:caption: ``yum.yml``
|
||||||
|
|
||||||
|
yum_config:
|
||||||
|
proxy: https://proxy.example.com
|
||||||
|
|
||||||
CentOS and EPEL Mirrors
|
CentOS and EPEL Mirrors
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
# 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.
|
# Whether or not to use a local Yum mirror.
|
||||||
#yum_use_local_mirror: false
|
#yum_use_local_mirror: false
|
||||||
|
5
releasenotes/notes/yum-config-58274185a00004e8.yaml
Normal file
5
releasenotes/notes/yum-config-58274185a00004e8.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Adds support for configuration of options in ``/etc/yum.conf``, via the
|
||||||
|
``yum_config`` variable.
|
Loading…
x
Reference in New Issue
Block a user