title: Ansible conditional based on stdout of result?
body: <p>How do I use the when statement based on the standard output of register: result?  If standard output exists I want somecommand to run if no standard output exists I want someothercommand to run.</p>
  
  <pre><code>- hosts: myhosts
    tasks:
    - name: echo hello
      command: echo hello
      register: result
    - command: somecommand {{ result.stdout }}
      when: result|success
    - command: someothercommand
      when: result|failed
  </code></pre>