Hi, 

we are trying to use the variable for the value of retries at loop. But 
always hit an error. We are using ansible version 1.4.3.

Here is the sample test playbook:

- hosts: test-servers
  vars:
    tries: 5
  tasks:
    - name: test
      debug: msg="looping"
      register: output
      until: no
      retries: "{{ tries | int }}"
      delay: 1

Here is the error we got:

TASK: [test] 
******************************************************************
fatal: [test01] => Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 
394, in _executor
    exec_rc = self._executor_internal(host, new_stdin)
  File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 
485, in _executor_internal
    return self._executor_internal_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 _executor_internal_inner
    for x in range(1, retries + 1):
TypeError: cannot concatenate 'str' and 'int' objects


FATAL: all hosts have already failed -- aborting

Does anyone have some idea? Appreciate your help. 

Thanks
Jack

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to