Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker_container healthcheck is not compared correctly in ansible 2.10 #85

Closed
Hennns opened this issue Feb 15, 2021 · 3 comments · Fixed by #88
Closed

docker_container healthcheck is not compared correctly in ansible 2.10 #85

Hennns opened this issue Feb 15, 2021 · 3 comments · Fixed by #88

Comments

@Hennns
Copy link

Hennns commented Feb 15, 2021

Summary

I use the following configuration, this works on ansible 2.9 (and follows the documentation).
community.general.docker_container:
healthcheck:
test: ["NONE"]
comparisons:
'*': strict

However, on ansible 2.10.5 this will cause the container to always be restarted.

Running with --check --diff I get the following output:

>  {
> -    "expected_healthcheck": {
> -        "Test": [
> -            "NONE"
> -        ]
> -    }
> +    "expected_healthcheck": {}
>  }

I attempted two other configurations:
healthcheck: {}
and:
healthcheck:
test: []

However, then I get this warning:
[WARNING]: healthcheck is ignored when test is not specified.

I can 'fix' this by simply ignoring the healthcheck:
healthcheck:
test: ["NONE"]
comparisons:
healthcheck: ignore
'*': strict

But I want to explicitly not have a healthcheck (so it doesn't quite work). It seems that something has changed between ansible 2.9 and ansible 2.10 here.

Issue Type

Bug Report

Component Name

community.general.docker_container

Ansible Version

ansible 2.10.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
@ansibullbot

This comment has been minimized.

@felixfontein felixfontein transferred this issue from ansible-collections/community.general Feb 15, 2021
@felixfontein
Copy link
Collaborator

I guess this was caused by ansible/ansible#66599. I'll have to take a longer look later today or tomorrow.

@felixfontein
Copy link
Collaborator

resolved_by_pr #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants