Add new option for YUM4/DNF repositories (#70042)
Documentation reference: https://dnf.readthedocs.io/en/stable/conf_ref.html Co-authored-by: Estelle Poulin <dev@inspiredby.es>
This commit is contained in:
parent
eeb153287b
commit
8324db7cb5
3 changed files with 13 additions and 0 deletions
2
changelogs/fragments/70042-dnf-repository-hotfixes.yml
Normal file
2
changelogs/fragments/70042-dnf-repository-hotfixes.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- yum_repository - added boolean option module_hotfixes which allows to enable functionality for dnf.
|
|
@ -109,6 +109,12 @@ options:
|
||||||
description:
|
description:
|
||||||
- A URL pointing to the ASCII-armored GPG key file for the repository.
|
- A URL pointing to the ASCII-armored GPG key file for the repository.
|
||||||
- It can also be a list of multiple URLs.
|
- It can also be a list of multiple URLs.
|
||||||
|
module_hotfixes:
|
||||||
|
description:
|
||||||
|
- Disable module RPM filtering and make all RPMs from the repository
|
||||||
|
available. The default is C(None).
|
||||||
|
version_added: '2.11'
|
||||||
|
type: bool
|
||||||
http_caching:
|
http_caching:
|
||||||
description:
|
description:
|
||||||
- Determines how upstream HTTP caches are instructed to handle any HTTP
|
- Determines how upstream HTTP caches are instructed to handle any HTTP
|
||||||
|
@ -409,6 +415,7 @@ class YumRepo(object):
|
||||||
'gpgcakey',
|
'gpgcakey',
|
||||||
'gpgcheck',
|
'gpgcheck',
|
||||||
'gpgkey',
|
'gpgkey',
|
||||||
|
'module_hotfixes',
|
||||||
'http_caching',
|
'http_caching',
|
||||||
'include',
|
'include',
|
||||||
'includepkgs',
|
'includepkgs',
|
||||||
|
@ -554,6 +561,7 @@ def main():
|
||||||
gpgcakey=dict(),
|
gpgcakey=dict(),
|
||||||
gpgcheck=dict(type='bool'),
|
gpgcheck=dict(type='bool'),
|
||||||
gpgkey=dict(type='list'),
|
gpgkey=dict(type='list'),
|
||||||
|
module_hotfixes=dict(type='bool'),
|
||||||
http_caching=dict(choices=['all', 'packages', 'none']),
|
http_caching=dict(choices=['all', 'packages', 'none']),
|
||||||
include=dict(),
|
include=dict(),
|
||||||
includepkgs=dict(type='list'),
|
includepkgs=dict(type='list'),
|
||||||
|
|
|
@ -114,6 +114,7 @@
|
||||||
file: "{{ yum_repository_test_repo.name ~ 2 }}"
|
file: "{{ yum_repository_test_repo.name ~ 2 }}"
|
||||||
ip_resolve: 4
|
ip_resolve: 4
|
||||||
keepalive: no
|
keepalive: no
|
||||||
|
module_hotfixes: no
|
||||||
register: test_repo_add1
|
register: test_repo_add1
|
||||||
|
|
||||||
- name: check that options are correctly getting written to the repo file
|
- name: check that options are correctly getting written to the repo file
|
||||||
|
@ -124,6 +125,7 @@
|
||||||
- "'enablegroups = 0' in repo_file_contents"
|
- "'enablegroups = 0' in repo_file_contents"
|
||||||
- "'ip_resolve = 4' in repo_file_contents"
|
- "'ip_resolve = 4' in repo_file_contents"
|
||||||
- "'keepalive = 0' in repo_file_contents"
|
- "'keepalive = 0' in repo_file_contents"
|
||||||
|
- "'module_hotfixes = 0' in repo_file_contents"
|
||||||
vars:
|
vars:
|
||||||
repo_file: "{{ '/etc/yum.repos.d/' ~ yum_repository_test_repo.name ~ '2.repo' }}"
|
repo_file: "{{ '/etc/yum.repos.d/' ~ yum_repository_test_repo.name ~ '2.repo' }}"
|
||||||
repo_file_contents: "{{ lookup('file', repo_file) }}"
|
repo_file_contents: "{{ lookup('file', repo_file) }}"
|
||||||
|
@ -138,6 +140,7 @@
|
||||||
file: "{{ yum_repository_test_repo.name ~ 2 }}"
|
file: "{{ yum_repository_test_repo.name ~ 2 }}"
|
||||||
ip_resolve: 4
|
ip_resolve: 4
|
||||||
keepalive: no
|
keepalive: no
|
||||||
|
module_hotfixes: no
|
||||||
register: test_repo_add2
|
register: test_repo_add2
|
||||||
|
|
||||||
- name: check Idempotant
|
- name: check Idempotant
|
||||||
|
|
Loading…
Reference in a new issue