add countme option to yum_repository (#82831)

* add countme option to yum_repository

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* add changelog fragment

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add version_added

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

* Update lib/ansible/modules/yum_repository.py

* Update lib/ansible/modules/yum_repository.py

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

* Update lib/ansible/modules/yum_repository.py

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
pull/74103/head
Thomas Sjögren 3 weeks ago committed by GitHub
parent 6b3bab6476
commit ae2234f185
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,2 @@
bugfixes:
- support the countme option when using yum_repository

@ -50,6 +50,13 @@ options:
- Relative cost of accessing this repository. Useful for weighing one
repo's packages as greater/less than any other.
type: str
countme:
description:
- Whether a special flag should be added to a randomly chosen metalink/mirrorlist query each week.
This allows the repository owner to estimate the number of systems consuming it.
default: ~
type: bool
version_added: '2.18'
deltarpm_metadata_percentage:
description:
- When the relative size of deltarpm metadata vs pkgs is larger than
@ -432,6 +439,7 @@ class YumRepo(object):
'bandwidth',
'baseurl',
'cost',
'countme',
'deltarpm_metadata_percentage',
'deltarpm_percentage',
'enabled',
@ -581,6 +589,7 @@ def main():
bandwidth=dict(),
baseurl=dict(type='list', elements='str'),
cost=dict(),
countme=dict(type='bool'),
deltarpm_metadata_percentage=dict(),
deltarpm_percentage=dict(),
description=dict(),

@ -97,6 +97,7 @@
baseurl: "{{ yum_repository_test_repo.baseurl }}"
description: New description
async: no
countme: yes
enablegroups: no
file: "{{ yum_repository_test_repo.name ~ 2 }}"
ip_resolve: 4
@ -114,6 +115,7 @@
that:
- "'async = 0' in repo_file_contents"
- "'name = New description' in repo_file_contents"
- "'countme = 1' in repo_file_contents"
- "'enablegroups = 0' in repo_file_contents"
- "'ip_resolve = 4' in repo_file_contents"
- "'keepalive = 0' in repo_file_contents"
@ -127,6 +129,7 @@
baseurl: "{{ yum_repository_test_repo.baseurl }}"
description: New description
async: no
countme: yes
enablegroups: no
file: "{{ yum_repository_test_repo.name ~ 2 }}"
ip_resolve: 4

Loading…
Cancel
Save