title: ansible - If files has different values then update them, otherwise ignore
body: <p>I have been struggling to get this logic correct now for weeks .. What I am trying to do is create an ansible playbook that will install my application on remote hosts ... I have that bit working ... </p>
  
  <p>Now the problem is, like with all app installs it means i need to do a sanity check and make sure that my config is correct.</p>
  
  <p>One of the things I am struggling with is if i have a massive chunk of text (like the one below i need to make sure that the values in that are correct</p>
  
  <p>I am using the Ansible Replace and Lineinfile modules for other things but i dont think it is correct to use those for what I am trying to achieve with this issue I am having ... Has anyone else done something like this where you have a playbook looking at a file and only if the value is not correct update it</p>
  
  <pre><code>        &lt;Set name="env"&gt;&lt;SystemProperty name="address" default="0.0.0.0"/&gt;&lt;/Set&gt;
          &lt;Set name="port"&gt;&lt;SystemProperty name="https" default="6328" /&gt;&lt;/Set&gt;
          &lt;Set name="idle"&gt;3&lt;/Set&gt;
          &lt;Set name="soLingerTime"&gt;&lt;Property name="http" default="-1568"/&gt;&lt;/Set&gt;
          &lt;Set name="acceptorDelta"&gt;&lt;Property name="ssol" default="9524"/&gt;&lt;/Set&gt;
          &lt;Set name="PriorityDelta"&gt;&lt;Property name="ssl34" default="9635"/&gt;&lt;/Set&gt;
          &lt;Set name="Size"&gt;15874&lt;/Set&gt;
  </code></pre>