title: Editing multiple destination files with ansible?
body: <p>I am currently trying to update all the wp-config.php files on multiple servers. 
  This below should work but it wont allow me to use regexp for the destination. </p>
  
  <p>Does anyone know an alternate way to do this?</p>
  
  <pre><code>---
  - hosts: blah.blah.net
    user: blah
    sudo: true
    tasks:
    - name: add a new string before the match
      lineinfile: dest='\/home\/.*\/public_html\/wp-config.php'
                  regexp='^\/\*\* MySQL database password \*\/'
                  insertbefore='^\/\*\* MySQL database password \*\/'
                  line='define("DISALLOW_FILE_MODS", true);'
  </code></pre>