* Temporary work-around for setuptools 36.0.0 bug.
* Use older setuptools for pip integration test.
* Limit isort version to avoid new test failures.
(cherry picked from commit 9d8aa43c67)
* Fix expect for python 3
- Change generator next to python 3 compatible
- Added tests for expect
* Add pexpect to integration.txt
- add pexpect library to requirements for integration tests
* Use ansible_python_interpreter in integration tests for expect
* Use double-quotes for expect integration tests
* Cast user input to string for expect integration tests
* Cast user input to string earlier in expect integration tests
* Use ansible.module_utils.six.moves input for expect integration tests
* Fix yamllint errors in the expect test
* Use cat to trigger timeout for expect integration tests
* Use realpath filter in expect integration tests
(cherry picked from commit daada2000c)
* Fix for UnboundLocalError while accessing deprecations
in result
* Add Unit test
Fixes#24592
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 764b4b20ec)
* Fix password prompt matching
* Add some tests for check_password_prompt
* Prevent pep8 line ends with a space error
(cherry picked from commit 040fb4435a)
The timeout for gathering facts needs to be settable from three places
(highest precedence to lowest):
* programmatically
* ansible.cfg (equivalent to the user specifying it explicitly when
calling setup)
* from the default value
The code was changed in b4bd6c80de to
allow programmatically and the default value to work correctly but
setting via ansible.cfg/parameter was broken.
This change should fix setting via ansible.cfg and adds unittests for
all three cases
Fixes#23753
(cherry picked from commit d088030fa6)
* Run `save` before exiting config mode.
* Fix unit tests for `save`
* Allow `save` to be on its own again and introspect success
* Introspecting `compare running` makes this a lot harder.
Move `save` tests to integration tests
(cherry picked from commit fc0bf87c20)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.
(cherry picked from commit d662f6f0db)
* keep unsafe .. unsafe
fixes#23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests
(cherry picked from commit 4594bee65a)
* Check for proper response key on eos_banner map_config_to_obj
If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!
* Do not assert session exists on eos_banner response not changing device
(cherry picked from commit 13b2f11139)
* Fix vault reading from stdin (avoid realpath() on non-links)
os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.
However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:
ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'
Fix is to specialcase '-' to not use realpath()
Fixes#23567
* to_text decrypt output when writing to stdout
(cherry picked from commit ae3d7fb29e)
* Remove commented code
Remove a lot of unnecessary output
* Tests
* Sort vlan ids _after_ running set operations, so order is not lost
(cherry picked from commit 0b4cebfb8b)
* Fix var precedence check to support python 3.
* Run CI sanity tests using python 3.5.
* Disable pylint non-iterator-returned test to pass on python 3.5.
(cherry picked from commit e7bb508ad6)
* Improve PEP8 compatibility
* Fix Python 3 incompatibility
Is prohibited to mutate OrderedDict during iteration through it so
is better to add records with error or warning to empty dictionary
instead of delete records from copy of dictionary during iterating.
* Decode output of subprocess from bytes to unicode.
* Add Python 3 support for validate-modules test.
Fix#18367
(cherry picked from commit 9d41aefd71)
Ansible will now automatically retry a connection if SSH returns an error:
mux_client_hello_exchange: write packet: Broken pipe
This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.
(cherry picked from commit 9f0be5a556)
the command dict in the iosxr module_utils wasn't encoding the request
to json. this patch will fix that problem
(cherry picked from commit f0008248d4)