* Fixup keyword dumping
* Clarify introductory text
* Turn links in the keyword description into seealso entries in the rst.
* Have plugin_formatter cleanup trailing whitespace
The indent filter in jinja2 < 2.10 indents blank lines by default which
leads to trailing whitespace. Cleanup after that filter.
* Edits
* Copy edit
(cherry picked from commit e07cbb033f)
If an embedded vaulted variable ('!vault' in yaml)
had an invalid format, it would eventually cause
an error for seemingly unrelated reasons.
"Invalid" meaning not valid hexlify (extra chars,
non-hex chars, etc).
For ex, if a host_vars file had invalid vault format
variables, on py2, it would cause an error like:
'ansible.vars.hostvars.HostVars object' has no
attribute u'broken.example.com'
Depending on where the invalid vault is, it could
also cause "VARIABLE IS NOT DEFINED!". The behavior
can also change if ansible-playbook is py2 or py3.
Root cause is errors from binascii.unhexlify() not
being handled consistently.
Fix is to add a AnsibleVaultFormatError exception and
raise it on any unhexlify() errors and to handle it
properly elsewhere.
Add a _unhexlify() that try/excepts around a binascii.unhexlify()
and raises an AnsibleVaultFormatError on invalid vault data.
This is so the same exception type is always raised for this
case. Previous it was different between py2 and py3.
binascii.unhexlify() raises a binascii.Error if the hexlified
blobs in a vault data blob are invalid.
On py2, binascii.Error is a subclass of Exception.
On py3, binascii.Error is a subclass of TypeError
When decrypting content of vault encrypted variables,
if a binascii.Error is raised it propagates up to
playbook.base.Base.post_validate(). post_validate()
handles exceptions for TypeErrors but not for
base Exception subclasses (like py2 binascii.Error).
* Add a display.warning on vault format errors
* Unit tests for _unhexlify, parse_vaulttext*
* Add intg test cases for invalid vault formats
Fixes#28038
(cherry picked from commit 9c58827410)
Fixes#23263
Add a carriage return (\r) at end on copy config
command which results in prompt on cli terminal
(cherry picked from commit 37b0537279)
Update CHANGELOG.md
This fix adds additional error handling for vmware connect
method, where username provided user does not have required
permissions to use/login ESXi.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 80967380d3)
* Refactor spec serialization so that native types are evaluated last.
* Remove redundant type checks
Fixes#30818
(cherry picked from commit ada404d0ac)
* tests for InventoryModule error conditions
* modified unicode in tests to ahear to Ansible best practices
* flake8 fixes
(cherry picked from commit cf938e9992)
ensures we get both a templated ignore_errors and a
correct 'summary' result for ignore_errors when used in loops
fixes#32384
(cherry picked from commit d22627d944)
* remove explicit provider reg from azure_rm (#31369)
* now that it's handled automatically as of msrest > 0.4.9
* add user-agent to Azure API calls (#31872)
* addi Ansible user-agent in Azure API calls
* fix import error
* add user agent for cloud shell (#32332)
We do not go through the effort of finding the right PROTOCOL setting if
we have SSLContext in the stdlib. So we do not want to hit the code
that uses PROTOCOL to set the urllib3-provided ssl context when
SSLContext is available. Also, the urllib3 implementation appears to
have a bug in some recent versions. Preferring the stdlib version will
work around that for those with Python-2.7.9+ as well.
Fixes#26235Fixes#25402Fixes#31998
(cherry picked from commit 725ae96e1b)
* Ensure include_role unit tests check something
This is not the case: get_tasks_vars doesn't yield
* Fix include_role unit tests
Since e609618274, include_role are not
static anymore.
(cherry picked from commit 43914b3837)
new match(block). It previously only occurred if a new match occurred,
but suggest it should occur when an end of a block match is found.
(cherry picked from commit 7553c42e09)
Update CHANGELOG
* adding the desired state config to the new vrf fixes#32111
* fix default vrf initial configured
* add unit test
* Update CHANGELOG
(cherry picked from commit 2c99cbc874)
* Fix wrong prompt issue for network moodules
Fixes#31161Fixes#32416
* Store the device prompt in case of error
from remote device
* Check for prompt value in ios action plugin
* Add integration test
* Update Changelog
(cherry picked from commit 26583adb58)