title: Unwrap ansible result variable
body: <p>This is something I often do</p>
  
  <pre><code>- name: check whether ready
    shell: do_something_complex
    changed_when: false
    ignore_errors: true
    register: result
  
  - name: make it ready
    when: result.rc != 0
  </code></pre>
  
  <p>It is messy when there are many tasks after that, which perform the same check.</p>
  
  <p>I would like instead to wrap the result somehow, and use it like this:</p>
  
  <pre><code>- name: do this if ready
    when: isReady
  
  - name: do that if not ready
    when: not isReady
  </code></pre>
  
  <p>How can I do that? (Preferably without intermediate dummy tasks that exist just to set variables.)</p>