title: Puppet: file_line evaluates os.path.join
body: <p>I'm trying to replace the Django-Settings line</p>
  
  <p><code>'NAME': os.path.join(BASE_DIR , 'db.sqlite3'),</code></p>
  
  <p>by</p>
  
  <p><code>'NAME': os.path.join(BASE_DIR , 'db.mysql'),</code></p>
  
  <p>but it doesn't find it.</p>
  
  <p>The other line with the ENGINE parameter works fine. The problem must be the "os.path.join"-part.</p>
  
  <pre><code>  # replace sqlite3 db with mysql
      file { '/var/www/mysite/mysite/settings.py':
        ensure =&gt; present,
      }
      file_line { 'replace db engine':
        path                =&gt; '/var/www/mysite/mysite/settings.py',
        replace             =&gt; true,
        line                =&gt; "'ENGINE': 'django.db.backends.mysql',",
        match               =&gt; "'ENGINE': 'django.db.backends.sqlite3',",
        append_on_no_match  =&gt; false,
      }
  
      file_line { 'replace db name':
        path                =&gt; '/var/www/mysite/mysite/settings.py',
        replace             =&gt; true,
        line                =&gt; "\'NAME\': os.path.join(BASE_DIR , \'db.mysql\'),",
        match               =&gt; "\'NAME\': os.path.join(BASE_DIR , \'db.sqlite3\'),",
        append_on_no_match  =&gt; false,
      }
  </code></pre>
  
  <p>I tried it with \' and without \ .</p>
  
  <p>Can somebody please help?</p>
  
  <p>EDIT:
  So if I add something like this beforehand:</p>
  
  <pre><code>  class { '::mysql::server':
      root_password    =&gt; 'strongpassword',
      override_options =&gt; { 'mysqld' =&gt; { 'max_connections' =&gt; '1024' } }
    }
  
    mysql::db { 'mynewDB':
      user     =&gt; 'admin',
      password =&gt; 'secret',
      host     =&gt; 'master.puppetlabs.vm',
      sql        =&gt; '/tmp/states.sql',
      require =&gt; File['/tmp/states.sql'],
    }
  </code></pre>
  
  <p>Then I would replace the NAME parameter with "mynewDB"?
  Did I understand it correctly?</p>