Python < 2.7.9 does not have the ssl.SSLContext attribute.
ssl.SSLContext is only required when we want to validate the SSL
connection. If `validate_certs` is false, we don't initialize the
`ssl_context` variable.
Add unit-test coverage and a little refactoring:
- avoid the use of `mocker`, when we can push `monkeypatch` which is
`pytest`'s default.
- use `mock.Mocker()` when possible
closes: #57072
(cherry picked from commit 3ea8e0a144)
* fix erroneous failures in docker_compose due to deprecation warnings from docker (#60961)
* Update error handling to work with new method of capturing output
Co-Authored-By: Felix Fontein <felix@fontein.de>
* update error handling
* fix syntax error
* fix indentation
* fix indentation (again)
* remove erroneous line
(cherry picked from commit 0c73e47a42)
* apt_facts - Fix cache related performance regression
* Another minor performance improvement
(cherry picked from commit 0f35e4b7b9)
Co-authored-by: Sam Doran <sdoran@redhat.com>
* Wait for the bucket to become available if possible before setting ACLs
(cherry picked from commit 91ccb03552)
Co-authored-by: Sloane Hertel <shertel@redhat.com>
On OpenBSD, 13 asterisk characters as a password hash, marks the
account as disabled. Otherwise daily(8) script which executes
security(8) will email operator about not properly locked accounts.
Before the diff, we see following warning:
> [WARNING]: The input password appears not to have been hashed. The 'password' argument must be encrypted for this module to work properly.
After the diff, warning is gone..
(cherry picked from commit 1dea661ce8)
Co-authored-by: kucharskim <mikolaj@kucharski.name>
* systemd module will now wait on deactivating state (#59471)
If a service is in the 'deactivating' state running systemctl stop foo,
would wait for the foo service to actually stop before it exits. The
module didn't behave like that and it considered the deactivating state
as if the service wasn't running. This change will align the module with
the systemctl behaviour.
(cherry picked from commit 54d9d7805d)
* Fix systemd start state with deactivating service state
(cherry picked from commit ee4b3b8854)
This should be ansible_connection, not connection_type. We can also
update local testing logic.
Remove nxos_install_os/tasks/network_local.yaml as it is nolonger used.
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
(cherry picked from commit 9e1b19e364)
Since there might be several projects with the same name in different
domains, it's required to define domain_id during project search.
Otherwise openstacksdk will raise "Multiple matches found" error
(cherry picked from commit 33ab7ca162)
* Mark logout as changed when docker logout does not return 'Not logged in to '.
* Add changelog.
* Improve logout detection.
* Also return output of 'docker logout'.
(cherry picked from commit 99fb0fcb2f)
* Backport to stable-2.8: Fix#56640: Map k8s ansible keys to api keys (#57418)
* Fix#56643: Map ansible keys to api keys
* Remove errant print line
* Fix pep8 issue
* Fix doc line
* Added test for validate_certs -> verify_ssl translation for k8s module
(cherry picked from commit 6e94b472e8)
* Removed proxy from AUTH_ARG_MAP and added fragment for backport
* Rename backport-57418.yaml to 60683-backport-57418.yaml
* Update 60683-backport-57418.yaml
* fix: docker_swarm_service does not publish both tcp and udp ports for same published port
* fix the linting problems and add the changelog fragment.
* add test
* modify test to ensure result rather than return value
(cherry picked from commit 064cd63f3d)
* win_domain reboot required exception incorrectly reported (#60496)
* Set reboot required dependent on exception message.
* Use exception id instead of it's message
* Add changelog fragment
* Warn when transforming constructed groups
The `keyed_groups` field has used sanitization since 2.6, but `groups` only started doing so in 2.8.
This adds a warning for the change in behavior.
* changelog
(cherry picked from commit 3247626ac7)
- Split the key validation to separate private and public.
- In case public key does not exist, recreate it.
- Validate comment of the key.
- In case comment changed, update the private and public keys.
(cherry picked from commit 27e414200f)
On POWER systems, /proc/cpuinfo provides a 'processor' entry as a
counter, and a 'cpu' entry with a description (similar to 'model name'
on x86). Support for POWER in get_cpu_facts was added via the 'cpu'
entry in commit 8746e692c1. Subsequent
support for ARM64 in commit ce4ada93f9
used the 'processor' entry, resulting in double-counting of cores on
POWER systems.
When unit tests were later written for this code in
commit 55306906cf, the erroneous values
were just accepted in the test instead of being diagnosed.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
(cherry picked from commit 93d9d64038)
* Removed extraneous type check from nagios module, in order to allow python 3.x
* Removed now useless import types
* Added changelog fragment
* Update changelog.
* Rebased and removed check due to module adding earlier guardrails
* Updated changelog to mention earlier fix adding now completely removed guardrails
* Remove superfluous type checks. Fix docs type.
* Update ignore.txt.
(cherry picked from commit 5d8302120b)
* Better cidr_ipv6 validation in ec2_group.py
* Improve warning/error handling, add changelog
* Update unit test for ipv6 validation
* Fix logic that was causing non /128 cidrs with host bits to not be handled
(cherry picked from commit 4308b87d72)
The final version of the fix makes the addition in two places instead of
moving the single addition from one place to another
(cherry picked from commit 84e3c0ef1d)
* Move plugin loader playbook dir additions back to Playbook instead of PlaybookCLI. Fixes#59548
* Restore cli additions
(cherry picked from commit 923e218)
Co-authored-by: Matt Martz <matt@sivel.net>