title: Ansible: How to check files is changed in shell command?
body: <p>I have file, generated by shell command</p>
  
  <pre><code>- stat: path=/etc/swift/account.ring.gz get_md5=yes
    register: account_builder_stat
  
  - name: write account.ring.gz file
    shell: swift-ring-builder account.builder write_ring &lt;--- rewrite account.ring.gz
      chdir=/etc/swift
    changed_when: ??? account_builder_stat.changed ??? &lt;-- no give desired effect
  </code></pre>
  
  <p>How can I check that the file has been changed?</p>