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_service: defined cpus
does not get casted into float
#30548
Comments
If 'cpus` is defined as a float in the argument_spec, this would not be a problem. I assume today it is defined as an int, or not specified at all ? |
There is a light at the end of the tunnel. We made a change to Jinja2 so we don't see all variable types changed into strings. See: pallets/jinja#708 |
Hopefully the fix to jinja2 gets merged soon. If someone needs a workaround I made a hackish fix for myself: s-hertel@559c498. |
#32738 is merged now. How would that affect this issue at hand? Thanks. |
Please note that the !component =lib/ansible/modules/cloud/docker/docker_compose.py Also, please note that currently, nobody is actively maintaining the Ansible |
Can you confirm if this is still an issue or not after #32738 was merged? needs_info |
@yajo This issue is waiting for your response. Please respond or the issue will be closed. |
Sorry, yes it works fine with jinja2_native enabled. Thanks! |
ISSUE TYPE
COMPONENT NAME
docker_service
ANSIBLE VERSION
CONFIGURATION
Nothing
OS / ENVIRONMENT
N/A
SUMMARY
Defining a service and trying to calculate the cpus parameter fails with:
Possibly related to #17992.
STEPS TO REPRODUCE
EXPECTED RESULTS
The
cpus
parameter should get casted to float or Ansible should have a way to force that, as I explained in #15249 (comment).ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: