On Mon, Apr 21, 2014 at 7:23 PM, Michael DeHaan <[email protected]> wrote:
> If you would ever like to report a crash, including the "result" of the > crash is > needed to understand the context. > Can you please paste the result you are receiving? > I'm not sure why you want the backtrace; it's already fixed in 1.6 by https://github.com/ansible/ansible/commit/2a976a. I've attached the backtrace at the end of this email. The actual crash is not my concern. There are several different ways that you can crash ansible on skipped roles. Another way to do it is via with_sequence: start=1 end={{ numFoo }} where numFoo is 0. That obviously should be an error when the task is run. What is surprising that ansible still crashes with "can't count backwards" even if you tell it to skip the role containing the task: - { role: 'foo', when: 'numFoo > 0' } This can be worked around through judicious use of the default filter. It's just annoying. My original email in this thread outlined a situation where I couldn't find a workaround, and asks for one. I can run ansible 1.6 locally, but I need my playbook to be compatible with 1.5. It's OK if it skips problematic plays. thanks, Bryan Traceback (most recent call last): File "/exo/ansible/bin/ansible-playbook", line 307, in <module> sys.exit(main(sys.argv[1:])) File "/exo/ansible/bin/ansible-playbook", line 247, in main pb.run() File "/exo/ansible/lib/ansible/playbook/__init__.py", line 286, in run if not self._run_play(play): File "/exo/ansible/lib/ansible/playbook/__init__.py", line 659, in _run_play if not self._run_task(play, task, False): File "/exo/ansible/lib/ansible/playbook/__init__.py", line 405, in _run_task self.callbacks.on_task_start(template(play.basedir, name, task.module_vars, lookup_fatal=False, filter_fatal=False), is_handler) File "/exo/ansible/lib/ansible/utils/template.py", line 321, in template varname = template_from_string(basedir, varname, vars, fail_on_undefined) File "/exo/ansible/lib/ansible/utils/template.py", line 562, in template_from_string res = jinja2.utils.concat(rf) File "<template>", line 12, in root File "/usr/lib/python2.7/dist-packages/jinja2/runtime.py", line 193, in call return __obj(*args, **kwargs) File "/exo/ansible/lib/ansible/utils/template.py", line 554, in my_lookup return lookup(*args, basedir=basedir, **kwargs) File "/exo/ansible/lib/ansible/utils/template.py", line 91, in lookup ran = instance.run(*args, inject=vars, **kwargs) File "/exo/ansible/lib/ansible/runner/lookup_plugins/file.py", line 42, in run ret.append(codecs.open(path, encoding="utf8").read().rstrip()) File "/usr/lib/python2.7/codecs.py", line 881, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 21] Is a directory: '/exo/ExocortexStudioServices/deploy/ansible/roles/users/files' -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJbEnTxUnCuHKXDDE%2BZP6cZCV6c5LgOkqVL%3DS%2BP1nH1%2BGdcsAQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
