Updates nxos action handler to handle deleting provider key if exists or
silently continuing if a KeyError is raised.
(cherry picked from commit 6a414371a1)
When ansible-connection forks the process, it changed the working
directory to /. This patch will prevent ansible-connection from
changing the working directory in the forked process.
(cherry picked from commit 77ce83fe22)
* synchronize: Convert cmd to list and fix handling of the copy_links argument
Converting cmd from str to list stops the pain of argument quoting/escaping.
* synchronize: Update imports according to #pullrequestreview-28758614
(cherry picked from commit f7c9f44aab)
The base64 stdlib functions require byte strings. So we have to
transform the strings into bytes before handing to the stdlib and then
transform them back into text before handing back to ansible.
Fixes#22873
(cherry picked from commit 589e217278)
* fixes#15770
* When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
(cherry picked from commit e084e8809e)
* updates command runs to return warning if command fails
* fixes variable issues from recent refactoring
* removes provider from return of module
(cherry picked from commit 866f67e213)
* fixes#22441
* fixes#22655
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
(cherry picked from commit cc68212612)
The junos action handler was not honoring the host value in the provider
argument. This patch will now use the provider host entry if it exists
and falls back to the inventory hostname
(cherry picked from commit cda3e001c6)
- Add support for module_utils packages for better organization.
- Add support for "virtual" module_utils packages such as `six`.
(cherry picked from commit 4fdeade389)
Otherwise the executable for the destination is also used on the local
machine and this might not exist.
Fixes: #22867
(cherry picked from commit 7a00f28804)
purge_subnets|routes were introduced recently.
ensure_subnet_associations now takes purge_subnets as a parameter. A
call to this function was missed when introducing this feature. With
out, results in a "got 5 expected 6" error.
(cherry picked from commit cd24bbbc9c)
* ensure exit_json does not fail from stderr=False
- do a little bit of safety-checking in exit_json to not try to .splitlines() on a boolean
- remove the stderr=boolean from uri.py, this is the only spot that uses it (at least so obviously)
- add unit tests that call exit_json. These are useless because the stderr parsing is in _execute_module and is difficult to mock; deleting these tests after the commit.
* remove added unit tests per prev commit
exit_json doesn't do the param parsing, that is buried deep inside _execute_module.
(cherry picked from commit 887456ab8e)
* Fix get_s3_connection (fixes#22317)
Override aws_connect_kwargs rather than prepending to them. Should fix an issue in which `calling_format` is set twice in the kwargs passed to `boto.connect_s3` or `S3Connection` if a bucket name contains a `.`
* Revert "Fix get_s3_connection (fixes#22317)"
This reverts commit 7f61b8bebd.
* implements alternative way of fixing issue with aws_connect_kwargs for rgw and fakes3 (fixes 22317)
* add comment to explain why the keys are being removed from aws_connect_kwargs
* remove trailing whitespace on comment line
* enables logging for network_cli and paramiko
* enables logging for ansible-connection
* enabled logging for netconf connection
(cherry picked from commit ed7cace425)
* Dropped openwrt module from curated to community (#22657)
* changed supported_by from curated to community (#22656)
* Changed supported_by from curated to community (#22654)
* Updates to docs for metadata. (#22667)
* Updates to docs for metadata.
* Update developing_modules_documenting.rst
Relative paths can break the synchronize plugin when the playbook
is not in the current working directory.
Fixes: ansible/ansible#22695
(cherry picked from commit ed15ba1b3c)
get_zone() is special, as it always returns a zone (default zone) even
if no zone param is given. This makes sense for many use cases.
(cherry picked from commit d1e8ef79ea)
SysLogHandler requires an int for port, but getenv produces a string.
Cast return from getenv as int to overcome this mismatch.
(cherry picked from commit 5334814396)