The AnsiBallZ wrapper is transferred to the remote machine with
a filename similar to the Ansible-module it runs. For modules like copy
and tempfile, this can end up conflicting with stdlib modules on the
remote machine depending on how python is setup there. We have a little
bit of code in the wrapper to deal with this by removing the path that
the ansible module resides in from sys.path.
On MacOSX, that code was having a problem. The path the module ends up
in included a symlinked directory so we were looking for a path in
sys.path but we had to look for the unsymlinked path instead.
Fix that by using os.path.realpath() instead of os.path.abspath()
(cherry picked from commit 15902f2496)
when using 'all' to load all plugins were ending in main namespace
creating conflicts with each other and random modulesr
i.e. when trying to access json callback we were getting json 'parsing' lib
(cherry picked from commit b93b9e68d7)
Using `meta: clear_facts` was failing with
`coercing to Unicode: need string or buffer, Host found`
This applies the same fix as 3101e24.
Fixes#26405
(cherry picked from commit 23041c3b6c)
In the past, selinux.security_get_boolean_names did return 'bytes'
on python 3, but this was changed to return string later, cf:
b8711e2eaf
So we have to convert to bytes only if the API return us bytes.
Fix#25651
(cherry picked from commit e2d6ecfa40)
DNF's base.group_install() function accepts a string as its first
argument. Prior to DNF-2, compatibility code existed which allowed this
function to accept a base.comps.Group object instead. That is no longer
possible.
Pass "group.id" to base.group_install() instead of "group" to work
around this.
(cherry picked from commit ccce74cf7b)
* Ensure that include_role properly fires handlers
include_role needs to ensure that any handlers included
with the role are added to the _notified_handler and
_listening_handler lists of the TaskQueueManager, otherwise
it fails when trying to run the handler.
Additionally, the handler needs to be added to the
PlayIterator's `_uuid_cache` or it fails after running
the handler
Add more uuid debug statements - this code was hard
to debug with existing debug statements, so add more
uuid information at little additional output cost.
Fixes#18411
* Add tests for include_role handlers
Tests for #18411
(cherry picked from commit ef8c9798d3)
Sometimes MacOSX's pwd doesn't return an expanded path. Not sure why
but this test is still valid if we expand it via a playbook filter so
go ahead and do that.
(cherry picked from commit 6a41a4f311)
* surrogate_then_strict doesn't exist. Switch to surrogate_or_strict
instead.
* Found some bugs in the _text.py implementation
* The composed error handlers (error handlers which are made up of two
or more python encoding error handlers) had a wrong string in it,
'surrogate_or_escape' doesn't exist. Replaced that with
'surrogate_or_replace' which is the correct handler name.
* Left comment about the implicit conditions that are part of the
surrogate_then_replace code path
Fixes#23865Fixes#23861
(cherry picked from commit fc5d71de0d)
* Replace Ethernet5 for Ethernet2 on eos integration tests (#26674)
In our CI, we only have 3 NICS: Management1, Ethernet1 and
Ethernet2.
(cherry picked from commit 4006b5d18f)
* Add CHANGELOG entry
* Remove enable EAPI from prepare_eos_tests (#26910)
Enabling EAPI is not common on CLI *and* EAPI tests, therefore
enabling it should be put at the eapi.yaml task level.
(cherry picked from commit 258d2058cd)
* Add missing provider on disable eapi tasks (#26928)
(cherry picked from commit 4532c791fd)
* Add CHANGELOG entry
* Fix multiple EOS EAPI code and test issues (#26651)
(cherry picked from commit b81209c187)
* Fix eos_banner basic-motd eapi asserts (#23398)
The commands in EAPI does not contain the plain command sent to the
device as a one liner, but it is split in cmd/input keys.
(cherry picked from commit ce9826d76e)
* Add CHANGELOG entry
* Change 'valid until' even it's the only updated field
(cherry picked from commit 460d932aa8)
* value is changed when another value is provided
(cherry picked from commit 460d932aa8)
* value isn't returned when unset
(cherry picked from commit 460d932aa8)
* Fix comparison between user input and applied configuration
(cherry picked from commit 460d932aa8)
Currently chocolatey is not failing when the user requests version X,
but version X is not available in the repository.
Obviously the module should fail in this case.
This fixes#25393
(cherry picked from commit b9d018885a)