* fixes become_method: runas for unprivileged users
* sets permissions on tempdir appropriately
* allows automatic system environment generation for new token (old Process.Start way prevents this)
* add basic become runas tests
(cherry picked from commit 6d99a0a93469448a2fd23169e31036263102e7e1)
openvswitch_db tests have been backported from devel to stable-2.3[1],
but the role to prepare_ovs_tests was missing from the backport, hence
the test, when run complained about missing roles.
This commit aims to bring this directory into stable-2.3 tree.
[1] https://github.com/ansible/ansible/pull/26330
openvswitch_db tests were added during 2.4 development, though the
module still existed in 2.3, so backport the tests.
This is needed for distributed-ci.
* fixes#23986
* fixes 3rd-party Windows connection plugins that don't support pipelining (eg awsrun)
(cherry picked from commit 6677559c698f15c582fba80d866f46458848f974)
The py-psycopg2 package now requires postgresql95-server instead of
postgresql93-server. Installing py-psycopg2 will automatically remove
postgresql93-server if it is installed, breaking integration tests.
(cherry picked from commit 15beaed6bc)
Previously we were getting "Your password does not satisfy the current policy requirements"
Possibly caused by a software update on Fedora
(cherry picked from commit 7ee7fa7332)
* 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)