Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 4.10.10
- Ruby: 2.1.9 (bundled)
- Distribution: RHEL 7.4
- Module version: 2.0.0
How to reproduce (e.g Puppet code you use)
Set up a default mongodb install with the module, e.g.
class { '::mongodb::globals':
manage_package_repo => true,
}
class { '::mongodb::server': }
class { '::mongodb::client': }
After puppet has set up everything, run mongo as root on the server to get a mongodb shell.
Exit the mongodb shell, then trigger a puppet run.
What are you seeing
Puppet sees the (empty) /root/.mongorc.js file, deletes it, and restarts mongod.
What behaviour did you expect instead
mongod should not be restarted whenever someone starts a mongo shell on the server as root.
Output log
Info: /Stage[main]/Mongodb::Server::Config/File[/root/.mongorc.js]: Filebucketed /root/.mongorc.js to puppet with sum d41d8cd98f00b204e9800998ecf8427e
Notice: /Stage[main]/Mongodb::Server::Config/File[/root/.mongorc.js]/ensure: removed
Info: Class[Mongodb::Server::Config]: Scheduling refresh of Class[Mongodb::Server::Service]
Info: Class[Mongodb::Server::Service]: Scheduling refresh of Service[mongodb]
Notice: /Stage[main]/Mongodb::Server::Service/Service[mongodb]: Triggered 'refresh' from 1 events
Any additional information you'd like to impart
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Set up a default mongodb install with the module, e.g.
After puppet has set up everything, run
mongoas root on the server to get a mongodb shell.Exit the mongodb shell, then trigger a puppet run.
What are you seeing
Puppet sees the (empty)
/root/.mongorc.jsfile, deletes it, and restarts mongod.What behaviour did you expect instead
mongod should not be restarted whenever someone starts a mongo shell on the server as root.
Output log
Any additional information you'd like to impart