mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
k8s loop flattening for template argument (#49)
* repo migration * Update and rename 411-k8s-loop-flattening-and-continue_on_error.yaml to 49-k8s-loop-flattening-and-continue_on_error.yaml * Update plugins/modules/k8s.py Co-authored-by: Mike Graves <mgraves@redhat.com> * split into multiple lines * linting * Update .gitignore * Update template.yml * merge * Update template.yml * deep copy environment * deepcopy * lint * remove useless comment * multiple definition * tests update * jmespath * Update ci.yml * Update template.yml Co-authored-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2018, Chris Houseknecht <@chouseknecht>
|
||||
# (c) 2021, Aubin Bikouo <@abikouo>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
@@ -123,6 +124,13 @@ options:
|
||||
When set to C(yes) leading spaces and tabs are stripped from the start of a line to a block.
|
||||
This functionality requires Jinja 2.7 or newer. Default value is false.'
|
||||
type: raw
|
||||
continue_on_error:
|
||||
description:
|
||||
- Whether to continue on creation/deletion errors when multiple resources are defined.
|
||||
- This has no effect on the validation step which is controlled by the C(validate.fail_on_error) parameter.
|
||||
type: bool
|
||||
default: False
|
||||
version_added: 2.0.0
|
||||
|
||||
requirements:
|
||||
- "python >= 2.7"
|
||||
@@ -276,6 +284,10 @@ result:
|
||||
returned: when C(wait) is true
|
||||
type: int
|
||||
sample: 48
|
||||
error:
|
||||
description: error while trying to create/delete the object.
|
||||
returned: error
|
||||
type: complex
|
||||
'''
|
||||
|
||||
import copy
|
||||
@@ -305,6 +317,7 @@ def argspec():
|
||||
argument_spec['apply'] = dict(type='bool', default=False)
|
||||
argument_spec['template'] = dict(type='raw', default=None)
|
||||
argument_spec['delete_options'] = dict(type='dict', default=None, options=copy.deepcopy(DELETE_OPTS_ARG_SPEC))
|
||||
argument_spec['continue_on_error'] = dict(type='bool', default=False)
|
||||
return argument_spec
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user