Making options of type list (fixing #32704) (#32706)

pull/14514/merge
Jiri Tyr 7 years ago committed by jctanner
parent 465b86f593
commit 1a3037ff63

@ -645,7 +645,7 @@ def main():
description=dict(), description=dict(),
enabled=dict(type='bool'), enabled=dict(type='bool'),
enablegroups=dict(type='bool'), enablegroups=dict(type='bool'),
exclude=dict(), exclude=dict(type='list'),
failovermethod=dict(choices=['roundrobin', 'priority']), failovermethod=dict(choices=['roundrobin', 'priority']),
file=dict(), file=dict(),
gpgcakey=dict(), gpgcakey=dict(),
@ -653,7 +653,7 @@ def main():
gpgkey=dict(type='list'), gpgkey=dict(type='list'),
http_caching=dict(choices=['all', 'packages', 'none']), http_caching=dict(choices=['all', 'packages', 'none']),
include=dict(), include=dict(),
includepkgs=dict(), includepkgs=dict(type='list'),
ip_resolve=dict(choices=['4', '6', 'IPv4', 'IPv6', 'whatever']), ip_resolve=dict(choices=['4', '6', 'IPv4', 'IPv6', 'whatever']),
keepalive=dict(type='bool'), keepalive=dict(type='bool'),
keepcache=dict(choices=['0', '1']), keepcache=dict(choices=['0', '1']),

@ -89,8 +89,6 @@
async: no async: no
enablegroups: no enablegroups: no
file: epel2 file: epel2
exclude:
- sl
ip_resolve: 4 ip_resolve: 4
keepalive: no keepalive: no
register: epel_add register: epel_add
@ -106,7 +104,6 @@
- "'async = 0' in repofile" - "'async = 0' in repofile"
- "'name = New description' in repofile" - "'name = New description' in repofile"
- "'enablegroups = 0' in repofile" - "'enablegroups = 0' in repofile"
- "\"exclude = ['sl']\" in repofile"
- "'ip_resolve = 4' in repofile" - "'ip_resolve = 4' in repofile"
- "'keepalive = 0' in repofile" - "'keepalive = 0' in repofile"
@ -118,8 +115,6 @@
async: no async: no
enablegroups: no enablegroups: no
file: epel2 file: epel2
exclude:
- sl
ip_resolve: 4 ip_resolve: 4
keepalive: no keepalive: no
register: epel_add register: epel_add
@ -147,7 +142,7 @@
assert: assert:
that: not epel_add.changed that: not epel_add.changed
- name: Test list for baseurl and gpgkey - name: Test list options
yum_repository: yum_repository:
name: listtest name: listtest
description: Testing list feature description: Testing list feature
@ -157,6 +152,12 @@
gpgkey: gpgkey:
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }} - gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG2-KEY-EPEL-{{ ansible_distribution_major_version }} - gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG2-KEY-EPEL-{{ ansible_distribution_major_version }}
exclude:
- aaa
- bbb
includepkgs:
- ccc
- ddd
- set_fact: - set_fact:
repofile: "{{ lookup('file', '/etc/yum.repos.d/listtest.repo') }}" repofile: "{{ lookup('file', '/etc/yum.repos.d/listtest.repo') }}"
@ -168,6 +169,8 @@
- "'download2.fedoraproject.org' in repofile" - "'download2.fedoraproject.org' in repofile"
- "'RPM-GPG-KEY-EPEL' in repofile" - "'RPM-GPG-KEY-EPEL' in repofile"
- "'RPM-GPG2-KEY-EPEL' in repofile" - "'RPM-GPG2-KEY-EPEL' in repofile"
- "'aaa bbb' in repofile"
- "'ccc ddd' in repofile"
value: value:
- name: Cleanup list test repo - name: Cleanup list test repo

@ -101,7 +101,7 @@
- "'async = 0' in repofile" - "'async = 0' in repofile"
- "'name = New description' in repofile" - "'name = New description' in repofile"
- "'enablegroups = 0' in repofile" - "'enablegroups = 0' in repofile"
- "\"exclude = ['libbdplus']\" in repofile" - "'exclude = libbdplus' in repofile"
- "'ip_resolve = 4' in repofile" - "'ip_resolve = 4' in repofile"
- "'keepalive = 0' in repofile" - "'keepalive = 0' in repofile"

Loading…
Cancel
Save