I have a playbook with the following contents

---
- hosts: all


  handlers:
  - name: user-create
    user: name=oracle state=present

  tasks:
  - name: "check user"
    command: /usr/bin/id oracle
    register: output
    notify: user-create
    when: "output.stderr not in ['succeed1', 'succeed2']"


whenver i run this playbook, encountering the following error -->

"failed": true,
    "msg": "The conditional check 'output.stderr not in ['succeed1',
'succeed2']' failed. The error was: error while evaluating conditional
(output.stderr not in ['succeed1', 'succeed2']): 'output' is
undefined\n\nThe error appears to have been in '/user-check.yml': line 10,
column 5, but may\nbe elsewhere in the file depending on the exact syntax
problem.\n\nThe offending line appears to be:\n\n  tasks:\n  - name:
\"check user\"\n    ^ here\n"


ANy help will be appreciated....

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFybtmPqp%3Dw4qoPScw-zX%3DWZ-%3D%2BBngYPiTSFe56ySLFHrenDQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to