[k8s] allow user to pass list of resources in to definition parameter (#42377)

* allow user to pass list of resources in to definition parameter

* Add new validator for list|dict|string

* use string_types instead of string

* state/force information is lost after the first item in the list

* Add tests

* Appease ansibot
This commit is contained in:
Fabian von Feilitzsch 2018-07-09 09:33:16 -04:00 committed by James Cammarata
commit e9c7b513a1
4 changed files with 125 additions and 5 deletions

View file

@ -25,7 +25,7 @@ class ModuleDocFragment(object):
options:
resource_definition:
description:
- "Provide a valid YAML definition (either as a string or a dict) for an object when creating or updating. NOTE: I(kind), I(api_version), I(name),
- "Provide a valid YAML definition (either as a string, list, or dict) for an object when creating or updating. NOTE: I(kind), I(api_version), I(name),
and I(namespace) will be overwritten by corresponding values found in the provided I(resource_definition)."
aliases:
- definition