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)
* Make sure postgresql tests are run for all postgres_* modules (#61647)
(cherry picked from commit 4d057e0331)
* Make sure postgresql tests are run for all postgres_* modules (#61647), remove non-existent
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)
* Improve return value documentation and example, fix typo in lib/ansible/modules/cloud/docker/docker_image_info.py
(cherry picked from commit 7a9e865a23)