On 02/05/2014 08:57 AM, [email protected] wrote: > Thanks, I will take a look at that post. > I haven't been able to find the "proper" way to do some of these things. > > Initially I had this running as a single class, working only with > requires, before, and notify. > > This is where I ran into trouble, maybe you know of an alternate > way to achieve this. > > During my initial setup, I start with a simple package, file service > relationship. > Next i need to add some users into the service which was just added. > For this, the service needs to be running (ensure => running). > > However, after that initial installation is done. I want the admin > to have the ability to stop the service, without worrying that puppet > is going to turn it back on. > So i got rid of ensure=>running, and instead used an Exec[] > (refreshonly) to start my service. The Package notifies the exec This is a common problem. It's been the problem with what I call "old world" thinking every time I've done a new Puppet deployment at a shop that isn't used to doing things in a sane, infrastructure-as-code way. Why do you want to stop a service that should be running? Either the service should be running, or it shouldn't.
If there's an emergency, the admin should either (a) complete their work in < a puppet run interval, or (b) `puppet agent --disable` (which ideally also throws some monitoring alerts) and stop the service. The way I've generally approached this problem is by finding out under what conditions an admin would have to stop the service, and teaching puppet to handle them. That being said, I can't say I can think of many services I have that I actually *want* stopped, ever. > > Now to add users. > I cannot "require" the Exec, because that only happens if after the > RPM is installed > > I keep running into cases where if I fix A, then B breaks. If i fix > B, then C breaks. if I fix C then A breaks again.. > This is why I broke it into phases. So I'll admit that, especially with proprietary software, it can be very difficult to shoehorn broken installation processes into a sane framework (Puppet). On a side note, the process you're talking about is strikingly similar to how one goes about installing and setting up RabbitMQ (at least 1.x) - install the RPM, start the service, but then to add users you need to have the admin plugin, and to make that active you need to restart the service. It's entirely possible to do though - you might benefit from some of the patterns used in https://github.com/puppetlabs/puppetlabs-rabbitmq > > > > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/896ed69c-06d9-424e-b218-a0c117233196%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52F275CA.9090107%40jasonantman.com. For more options, visit https://groups.google.com/groups/opt_out.
