title: Replace string with hostname
body: <p>I've been searching up and down for a way to replace a string in a file with the contents of <code>ansible_hostname</code>. Say I have something similar to this in a configuration file:</p>
  
  <pre><code>kern.*       /syslog/SYSLOG_SERVER/kern.log 
  auth.*       /syslog/SYSLOG_SERVER/auth.log
  </code></pre>
  
  <p>Is there an easy way in Ansible to replace all occurrences of <code>SYSLOG_SERVER</code> with the hostname of the server the configuration file is copied to? If anyone has an example or a link describing how to do this I would be super appreciative if you shared it.</p>