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
failed to use variable for retries in the loop #5865
Comments
Looks like this is still an issue with 1.8.2? |
Yes, in 1.8.2
produces
|
In which version is this fixed? |
I have it working with Ansible |
Hey guys, looks like we have a regression on 2.3.0, at least when using on docker_service.scale:
I've tried with and without |
@semente You can ignore the double quotes, like |
@kassiansun thanks but that won't work due a syntax error.
|
@semente Oh, it can be used in jinja2 templates, but you're using this in playbooks. I submitted a patch to my own repository: https://github.com/kassiansun/ansible/commit/59e38bd4bc383a608b62a6cc6b6c89d201203226, you can hot fix the code in Many ansible modules are poorly maintained like |
Hey @kassiansun, awesome! I didn't work on this project since them but I will test your patch asap and I let you know if it fixed the issue. Thanks!! By the way, should I open a new Issue or that won't be necessary? |
@semente Seems a good idea, as this issue is closed long time ago. |
Now that ansible/ansible#5865 has long-since been fixed
Issue Type:
“Bug Report”
Ansible Version:
1.4.3
Environment:
RHEL 6.5
Summary:
we are trying to use the variable for the value of retries at loop. But always hit an error
Steps To Reproduce:
Run following playbook:
Expected Results:
retries count is 5
Actual Results:
get following error:
TASK: [test] ******************************************************************
fatal: [localhost] => Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ansible/runner/init.py", line 394, in executor
execrc = self.executorinternal(host, new_stdin)
File "/usr/lib/python2.6/site-packages/ansible/runner/init.py", line 485, in executorinternal
return self.executorinternal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
File "/usr/lib/python2.6/site-packages/ansible/runner/init.py", line 694, in executorinternal_inner
for x in range(1, retries + 1):
TypeError: cannot concatenate 'str' and 'int' objects
FATAL: all hosts have already failed -- aborting
The text was updated successfully, but these errors were encountered: