mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add any_errors_fatal global config
This commit is contained in:
parent
e9447e9481
commit
32fa4db232
3 changed files with 22 additions and 8 deletions
|
@ -310,6 +310,9 @@
|
|||
# ENABLING THIS COULD BE A SECURITY RISK
|
||||
#allow_unsafe_lookups = False
|
||||
|
||||
# set default errors for all plays
|
||||
#any_errors_fatal = False
|
||||
|
||||
[privilege_escalation]
|
||||
#become=True
|
||||
#become_method=sudo
|
||||
|
|
|
@ -180,6 +180,16 @@ ANSIBLE_SSH_RETRIES:
|
|||
value_type: integer
|
||||
vars: []
|
||||
yaml: {key: ssh_connection.retries}
|
||||
ANY_ERRORS_FATAL:
|
||||
default: False
|
||||
env:
|
||||
- name: ANSIBLE_ANY_ERRORS_FATAL
|
||||
ini:
|
||||
- section: defauls
|
||||
key: any_errors_fatal
|
||||
value_type: boolean
|
||||
vars: []
|
||||
yaml: {key: errors.anyerrors_fatal}
|
||||
BECOME_ALLOW_SAME_USER:
|
||||
default: False
|
||||
desc: 'TODO: write it'
|
||||
|
|
|
@ -27,12 +27,13 @@ from functools import partial
|
|||
|
||||
from jinja2.exceptions import UndefinedError
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
from ansible.module_utils.six import iteritems, string_types, with_metaclass
|
||||
from ansible.errors import AnsibleParserError, AnsibleUndefinedVariable
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.playbook.attribute import Attribute, FieldAttribute
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
from ansible.constants import mk_boolean as boolean
|
||||
from ansible.utils.vars import combine_vars, isidentifier, get_unique_id
|
||||
|
||||
try:
|
||||
|
@ -157,13 +158,13 @@ class Base(with_metaclass(BaseMeta, object)):
|
|||
_vars = FieldAttribute(isa='dict', priority=100, inherit=False)
|
||||
|
||||
# flags and misc. settings
|
||||
_environment = FieldAttribute(isa='list')
|
||||
_no_log = FieldAttribute(isa='bool')
|
||||
_always_run = FieldAttribute(isa='bool')
|
||||
_run_once = FieldAttribute(isa='bool')
|
||||
_ignore_errors = FieldAttribute(isa='bool')
|
||||
_check_mode = FieldAttribute(isa='bool')
|
||||
_any_errors_fatal = FieldAttribute(isa='bool', always_post_validate=True)
|
||||
_environment = FieldAttribute(isa='list')
|
||||
_no_log = FieldAttribute(isa='bool')
|
||||
_always_run = FieldAttribute(isa='bool')
|
||||
_run_once = FieldAttribute(isa='bool')
|
||||
_ignore_errors = FieldAttribute(isa='bool')
|
||||
_check_mode = FieldAttribute(isa='bool')
|
||||
_any_errors_fatal = FieldAttribute(isa='bool', default=C.ANY_ERRORS_FATAL, always_post_validate=True)
|
||||
|
||||
# param names which have been deprecated/removed
|
||||
DEPRECATED_ATTRIBUTES = [
|
||||
|
|
Loading…
Reference in a new issue