| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
fixes #24169
|
|
|
|
|
|
|
|
|
|
| |
* Fix for UnboundLocalError while accessing deprecations
in result
* Add Unit test
Fixes #24592
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
|
|
|
|
|
|
| |
When unittesting, the framework creates a pipes module that is picked up
by the basic module_utils test. Switch to using shlex_quote as that is
the right thing to use for portability anyway.
|
|
|
|
|
| |
These were discovered on python3 with fetch code that fails on errors. Probably could be
provoked with particular sets of arguments to stat as well.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* E1 pep8 fixes
* e111 fix for rds.py
|
|
|
|
| |
fixes #22785
|
| |
|
| |
|
|
|
|
| |
This fixes #21795
|
|
|
|
|
|
| |
Normalize this function to use native strings. Native strings won't
display an extra "u" or "b" character to denote py2 unicode or py3 bytes
types.
|
| |
|
|
|
|
|
|
|
|
| |
* refine password field filtering
* dont skip
* removed bad leftover vestige of previous condition
|
|
|
|
|
|
|
|
|
|
| |
* Remove unused attribute '_passthrough'
* Don't mix deprecations with warnings
* Return values: add 'deprecations' key used internally
* 'deprecations' and 'warnings' return values: add tests
|
| |
|
|
|
|
|
| |
* Add a surrogate_then_replace error strategy to keep to_bytes from tracebacking by default
* Port all code that explicitly used surrogate_or_replace to surrogate_then_replace
|
|
|
|
|
|
| |
- also warn as module SHOULD have no_log
- make password regex exportable for testing
- avoids boolean fields
|
|
|
|
|
|
|
| |
* replaces persistent connection digest with _create_control_path()
* adds _ansible_socket to _legal_inputs in basic.py
* adds connection_user to play_context
* maps remote_user to connection_user when connection is local
* maps ansible_socket in task_vars to module_args _ansible_socket if exists
|
| |
|
|
|
|
| |
(cherry picked from commit c4b09cbcb4df160509f44ffddfedf586391b6878)
|
|
|
|
| |
(cherry picked from commit ef1ecfd2c28412531fc7e0482b66dab92226306f)
|
|
|
|
|
|
|
|
| |
* module_utils: implement deprecation warning for params
* rename deprecated_version to removed_in_version
* fix pep8 E121
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Support logical or condition in required_if
Add logical 'or' condition support in 'required_if'
for requirements.
* If requirements is a list all parameters within it should
be present.
* If requirements is a set atleast one parameter should
be present
* Fix review comment
|
| |
|
|
|
|
|
|
|
|
|
| |
added better way of adding warnings to return data
backwards compatible if warnings key already exists
added deprecations made iface more generic
changed to enforce type per item
added logging of warnings/deprecations
also display deprecations by default
|
| |
|
|
|
|
|
|
|
|
| |
* PEP 8 E121 cleanup.
* PEP 8 E126 cleanup.
* PEP 8 E122 cleanup.
|
|
|
|
|
|
|
| |
* PEP 8 E703 cleanup.
* PEP 8 E701 cleanup.
* PEP 8 E711 cleanup.
* PEP 8 W191 and E101 cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When becoming an unprivileged user using non-sudo on a platform where
getlogin() failed in our situation we were not able to detect that the
user had switched. This meant that all of our logic to use move vs copy
if the user had switched was attempting the wrong thing. This change
tries the to do the right thing but then falls back to an acceptable
second choice if it doesn't work.
The bug wasn't easily detected because:
* sudo was not affected because sudo records that the user's have been
switched so we were able to detect that.
* getlogin() works on most platforms. RHEL5 with python-2.4 seems to be
the only platform we still care about where getlogin() fails for this
case.
* It had to be becoming an unprivileged user. When becoming
a privileged user, the user would be able to successfully perform the
best case tasks.
|
| |
|
| |
|
| |
|
|
|
|
| |
preserves existing flag info if possible
|
| |
|
| |
|
| |
|
|
|
|
| |
Include the searched paths in the error message.
|
|
|
|
|
|
| |
Keep track of all the unsupported parameters, and include
all of them in the error message as well as a list of the
supported params.
|
|
|
|
|
|
|
|
| |
The process to poll for data in the stdout and/or stderr pipes during a
low-level command execution was repetitive. Factoring this out into a
function DRYs out the code.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
|
|
|
|
| |
This is for py3 compatibility #18506
|
|
|
|
|
|
|
|
|
|
|
| |
* log on target based on nolog, not verbosity
fies #18569
* initialize module name
removing verbosity exposed missing name at certain stages, initialize to file name
and update later once module args are parsed
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8b08a28c895666b9fc673e5bf26bd91b2be77fe6 removed a
call to get_exception() that was needed. Without it, the fail_json
references an undefined variable ('exception') and throws an exception.
Add the get_exception() back in where needed and update references.
Now the proper module failure is returned.
Fixes #18628
|
|
|
|
|
|
|
|
| |
* added attributes to base file params
* dont change attributes when none
* fixed test to deal with new attributes
|
|
|
|
|
|
|
|
| |
This limitation of python-3.4 mkstemp() is the final reason we made
python-3.5 our minimum version. Since we know about it, give a nice
error to the user with a hint that Python3.4 could be the issue.
Fixes #18160
|