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

This commit is contained in:
Jiri Tyr 2017-11-09 15:57:27 +00:00 committed by jctanner
parent 465b86f593
commit 1a3037ff63
3 changed files with 12 additions and 9 deletions

View file

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

View file

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

View file

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