* Add Support of healthcheck in docker_container module
Fixes#33622
Now container can be started with healthcheck enabled
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Extend docker_container healthcheck (#1)
* Allowing to disable healthcheck.
* Added test for healthcheck.
* Make sure correct types are used.
* Healthcheck needs to be explicitly disabled with test: ['NONE'].
* pep8 fixes
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Fix bug if healthcheck interval is 1 day or more
`timedelta` object has days too and seconds are up to one day.
Therefore use `total_seconds()` to convert time into seconds.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Add test for healthcheck when healthcheck is not specified
This is to avoid the situation when healthcheck is not specified and
treat this as healthcheck is changed or removed.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Convert string syntax for healthcheck test to CMD-SHELL
Also add another test case to check idempotency when healthcheck test
is specified as string
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Playbook fails if minimun docker version is not satisfy for healthcheck
This is to make more consistent with other non-supported options.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* WinRM/PSRP: Ensure shell returns UTF-8 output
This PR makes UTF-8 output work in PSRP shells.
* Add win_command and win_shell integration tests
* Fix tests
* more test fixes
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.
* Add tests.
* Added changelog.
This reverts commit 0e933f76ba.
The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform. Tests need to be rewritten
* Fix AWS EC2 inventory plugin caching of groups
* Added changelog fragment for aws_ec2 caching fix
* Store the AWS query results
The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.
* Remove unused functions
* Add runtime option to docker_container module
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add changelog fragment
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add idempotency test for docker_container.runtime
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
This should provide a startup time speed boost at the expense of making
it harder to get ansible to use newer versions of packages than are
provided by the platform.
* reboot: Add timeout in error to help troubleshooting
So we've been hit by 'Timed out waiting for boot_time check' and it was
unclear what timeout was used for the boot_time check. By adding the
timeout value it is easier to understand the used value, and verify if a
change to the timeout is reflected in the output.
* Add changelog fragment
* removed hardcoded loader/plugins list
* updated a few errors to keep orig object
* fix httpapi/cliconf listing
* ansible-doc fixes
* show undocumented as UNDOCUMENTEd
* added missing undoc
* An earlier optimization of ansible-doc -l caused failures.
The optimization quickly searches the plugin code for short_description
fields and then uses that in the -l output. The searching was a bit too
naive and ended up pulling out malformed yaml. This caused those
plugins to be omitted from the list of plugins of that type with
a warning that their documentation strings were wrong.
This change makes the documentation parser aware that the documentation
string could have a relative indent for all of its fields which makes it
robust in the face of this particular problem.
* Don't search for space after short_description:
Any whitespace would be valid. In particular newline
Python sets the SIGPIPE handler to SIG_IGN. On execv() signal handlers are
reset to their defaults, EXCEPT those that are SIG_IGN which are left ignored.
In Python 3 subprocess.popen explicitly resets the SIGPIPE handler to SIG_DFL,
but unfortunately in Python 2.7 it does not. This leads to subprocesses being
executed with SIGPIPE ignored. This is often a problem with bash scripts which
rely on SIGPIPE to terminate commands in a pipe, but can easily be a problem
with other applications.
This implements the Python 3 behaviour for Python 2.7 by using a preexec_fn.
* Locate prtdiag even when absent from /usr/bin
On Solaris 8 hosts, this prevents fact collection from aborting with:
Argument 'args' to run_command must be list or string
* Lint fix.
* Style: pass /usr/platform/.../sbin as optional path to get_bin_path().