parent
7a5e46c732
commit
ac27c54c2e
2 changed files with 28 additions and 13 deletions
|
@ -19,13 +19,15 @@
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
from ansible.errors.yaml_strings import ( YAML_POSITION_DETAILS,
|
from ansible.errors.yaml_strings import (
|
||||||
YAML_COMMON_UNQUOTED_VARIABLE_ERROR,
|
|
||||||
YAML_COMMON_DICT_ERROR,
|
YAML_COMMON_DICT_ERROR,
|
||||||
YAML_COMMON_UNQUOTED_COLON_ERROR,
|
YAML_COMMON_LEADING_TAB_ERROR,
|
||||||
YAML_COMMON_PARTIALLY_QUOTED_LINE_ERROR,
|
YAML_COMMON_PARTIALLY_QUOTED_LINE_ERROR,
|
||||||
YAML_COMMON_UNBALANCED_QUOTES_ERROR,
|
YAML_COMMON_UNBALANCED_QUOTES_ERROR,
|
||||||
YAML_COMMON_LEADING_TAB_ERROR)
|
YAML_COMMON_UNQUOTED_COLON_ERROR,
|
||||||
|
YAML_COMMON_UNQUOTED_VARIABLE_ERROR,
|
||||||
|
YAML_POSITION_DETAILS,
|
||||||
|
)
|
||||||
from ansible.module_utils._text import to_native, to_text
|
from ansible.module_utils._text import to_native, to_text
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,53 +163,67 @@ class AnsibleError(Exception):
|
||||||
|
|
||||||
return error_message
|
return error_message
|
||||||
|
|
||||||
|
|
||||||
class AnsibleOptionsError(AnsibleError):
|
class AnsibleOptionsError(AnsibleError):
|
||||||
''' bad or incomplete options passed '''
|
''' bad or incomplete options passed '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleParserError(AnsibleError):
|
class AnsibleParserError(AnsibleError):
|
||||||
''' something was detected early that is wrong about a playbook or data file '''
|
''' something was detected early that is wrong about a playbook or data file '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleInternalError(AnsibleError):
|
class AnsibleInternalError(AnsibleError):
|
||||||
''' internal safeguards tripped, something happened in the code that should never happen '''
|
''' internal safeguards tripped, something happened in the code that should never happen '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleRuntimeError(AnsibleError):
|
class AnsibleRuntimeError(AnsibleError):
|
||||||
''' ansible had a problem while running a playbook '''
|
''' ansible had a problem while running a playbook '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleModuleError(AnsibleRuntimeError):
|
class AnsibleModuleError(AnsibleRuntimeError):
|
||||||
''' a module failed somehow '''
|
''' a module failed somehow '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleConnectionFailure(AnsibleRuntimeError):
|
class AnsibleConnectionFailure(AnsibleRuntimeError):
|
||||||
''' the transport / connection_plugin had a fatal error '''
|
''' the transport / connection_plugin had a fatal error '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleFilterError(AnsibleRuntimeError):
|
class AnsibleFilterError(AnsibleRuntimeError):
|
||||||
''' a templating failure '''
|
''' a templating failure '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleLookupError(AnsibleRuntimeError):
|
class AnsibleLookupError(AnsibleRuntimeError):
|
||||||
''' a lookup failure '''
|
''' a lookup failure '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleCallbackError(AnsibleRuntimeError):
|
class AnsibleCallbackError(AnsibleRuntimeError):
|
||||||
''' a callback failure '''
|
''' a callback failure '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleUndefinedVariable(AnsibleRuntimeError):
|
class AnsibleUndefinedVariable(AnsibleRuntimeError):
|
||||||
''' a templating failure '''
|
''' a templating failure '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleFileNotFound(AnsibleRuntimeError):
|
class AnsibleFileNotFound(AnsibleRuntimeError):
|
||||||
''' a file missing failure '''
|
''' a file missing failure '''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleActionSkip(AnsibleRuntimeError):
|
class AnsibleActionSkip(AnsibleRuntimeError):
|
||||||
''' an action runtime skip'''
|
''' an action runtime skip'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AnsibleActionFail(AnsibleRuntimeError):
|
class AnsibleActionFail(AnsibleRuntimeError):
|
||||||
''' an action runtime failure'''
|
''' an action runtime failure'''
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -18,7 +18,6 @@ lib/ansible/compat/__init__.py
|
||||||
lib/ansible/compat/selectors/__init__.py
|
lib/ansible/compat/selectors/__init__.py
|
||||||
lib/ansible/compat/tests/__init__.py
|
lib/ansible/compat/tests/__init__.py
|
||||||
lib/ansible/constants.py
|
lib/ansible/constants.py
|
||||||
lib/ansible/errors/__init__.py
|
|
||||||
lib/ansible/executor/__init__.py
|
lib/ansible/executor/__init__.py
|
||||||
lib/ansible/executor/action_write_locks.py
|
lib/ansible/executor/action_write_locks.py
|
||||||
lib/ansible/executor/module_common.py
|
lib/ansible/executor/module_common.py
|
||||||
|
|
Loading…
Add table
Reference in a new issue