title: Puppet MongoDb enabling authentication
body: <p>I'm working on enabling authentication using the <a href="https://forge.puppetlabs.com/puppetlabs/mongodb" rel="nofollow">puppetlabs mongodb module</a>.</p>
  
  <p>As the docs say, to enable authentication, I should add auth => true.
  But in order for authentication to work, I <a href="http://docs.mongodb.org/manual/tutorial/enable-authentication/" rel="nofollow">have to add a user to the admin database</a>, so I did that like so:</p>
  
  <pre><code>mongodb::db { 'admin':
    user          =&gt; 'adminuser',
    password_hash =&gt; 'a15fbfca5e3a758be80ceaf42458bcd8',
  }
  </code></pre>
  
  <p>This works for the first run, but subsequent runs results in the error:</p>
  
  <blockquote>
    <p>Mongodb::Db[admin]/Mongodb_database[admin]: Could not evaluate:
    Execution of '/usr/bin/mongo --quiet --eval
    db.getMongo().getDBNames()' returned 252: Wed Mar 26 16:28:40 uncaught
    exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0
    }</p>
  </blockquote>
  
  <p>This makes sense, since it's unable to authenticate now to check if the admin database already exists.</p>
  
  <p>How do you handle configuring mongodb password authentication with this module?</p>