add type of elements of list in package modules (#63427)
This commit is contained in:
parent
2b8553b242
commit
2108a2e1c9
6 changed files with 18 additions and 5 deletions
|
@ -35,6 +35,8 @@ options:
|
|||
name:
|
||||
description:
|
||||
- A package name, like C(foo), or multiple packages, like C(foo, bar).
|
||||
type: list
|
||||
elements: str
|
||||
repository:
|
||||
description:
|
||||
- A package repository or multiple repositories.
|
||||
|
@ -298,7 +300,7 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
state=dict(default='present', choices=['present', 'installed', 'absent', 'removed', 'latest']),
|
||||
name=dict(type='list'),
|
||||
name=dict(type='list', elements='str'),
|
||||
repository=dict(type='list'),
|
||||
update_cache=dict(default='no', type='bool'),
|
||||
upgrade=dict(default='no', type='bool'),
|
||||
|
|
|
@ -27,6 +27,8 @@ options:
|
|||
- A list of package names, like C(foo), or package specifier with version, like C(foo=1.0).
|
||||
Name wildcards (fnmatch) like C(apt*) and version wildcards like C(foo=1.0*) are also supported.
|
||||
aliases: [ package, pkg ]
|
||||
type: list
|
||||
elements: str
|
||||
state:
|
||||
description:
|
||||
- Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies
|
||||
|
@ -1021,7 +1023,7 @@ def main():
|
|||
update_cache_retry_max_delay=dict(type='int', default=12),
|
||||
cache_valid_time=dict(type='int', default=0),
|
||||
purge=dict(type='bool', default=False),
|
||||
package=dict(type='list', aliases=['pkg', 'name']),
|
||||
package=dict(type='list', elements='str', aliases=['pkg', 'name']),
|
||||
deb=dict(type='path'),
|
||||
default_release=dict(type='str', aliases=['default-release']),
|
||||
install_recommends=dict(type='bool', aliases=['install-recommends']),
|
||||
|
|
|
@ -37,6 +37,8 @@ options:
|
|||
description:
|
||||
- list of names of packages to install/remove
|
||||
aliases: ['pkg', 'package', 'formula']
|
||||
type: list
|
||||
elements: str
|
||||
path:
|
||||
description:
|
||||
- "A ':' separated list of paths to search for 'brew' executable.
|
||||
|
@ -814,6 +816,7 @@ def main():
|
|||
aliases=["pkg", "package", "formula"],
|
||||
required=False,
|
||||
type='list',
|
||||
elements='str',
|
||||
),
|
||||
path=dict(
|
||||
default="/usr/local/bin",
|
||||
|
|
|
@ -29,6 +29,8 @@ options:
|
|||
description:
|
||||
- A list of port names.
|
||||
aliases: ['port']
|
||||
type: list
|
||||
elements: str
|
||||
selfupdate:
|
||||
description:
|
||||
- Update Macports and the ports tree, either prior to installing ports or as a separate step.
|
||||
|
@ -267,7 +269,7 @@ def deactivate_ports(module, port_path, ports):
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
name=dict(aliases=["port"], type='list'),
|
||||
name=dict(type='list', elements='str', aliases=["port"]),
|
||||
selfupdate=dict(aliases=["update_cache", "update_ports"], default=False, type='bool'),
|
||||
state=dict(default="present", choices=["present", "installed", "absent", "removed", "active", "inactive"]),
|
||||
upgrade=dict(default=False, type='bool'),
|
||||
|
|
|
@ -30,6 +30,8 @@ options:
|
|||
- Name or list of names of the package(s) or file(s) to install, upgrade, or remove.
|
||||
Can't be used in combination with C(upgrade).
|
||||
aliases: [ package, pkg ]
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
state:
|
||||
description:
|
||||
|
@ -416,7 +418,7 @@ def expand_package_groups(module, pacman_path, pkgs):
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='list', aliases=['pkg', 'package']),
|
||||
name=dict(type='list', elements='str', aliases=['pkg', 'package']),
|
||||
state=dict(type='str', default='present', choices=['present', 'installed', 'latest', 'absent', 'removed']),
|
||||
force=dict(type='bool', default=False),
|
||||
extra_args=dict(type='str', default=''),
|
||||
|
|
|
@ -30,6 +30,8 @@ options:
|
|||
package:
|
||||
description:
|
||||
- Package atom or set, e.g. C(sys-apps/foo) or C(>foo-2.13) or C(@world)
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
state:
|
||||
description:
|
||||
|
@ -462,7 +464,7 @@ portage_absent_states = ['absent', 'unmerged', 'removed']
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
package=dict(default=None, aliases=['name'], type='list'),
|
||||
package=dict(type='list', elements='str', default=None, aliases=['name']),
|
||||
state=dict(
|
||||
default=portage_present_states[0],
|
||||
choices=portage_present_states + portage_absent_states,
|
||||
|
|
Loading…
Reference in a new issue