Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Puppet...

I had a situation with NTP whereby I wanted to install ntpd if NTP was not installed, but only if neither openntp nor ntpd were installed. (I solved this by using the Alexandrian Solution: I got rid of openntp...)

This goes beyond ensure => absent and ensure => present; how would you go about setting this up? What about the dependencies?

Thinking about this, it would mean that NTPd is only installed if OpenNTP is missing. But then this does not mean that (in context) that OpenNTPd must be missing... Would the audit option be appropriate here?

share|improve this question

You can create a fact that returns whether OpenNTP is installed or not, and use that to control the result. Though, to be honest, I'd also just remove one of them -- why keep two versions of the stuff if you can easily choose one? Sometimes there are reasons, but, then, you'd make your rules based on these reasons, not based on the actual presence of the package.

share|improve this answer
That's what I decided on doing. The initial thinking was I didn't want to change what was already being used. Creating a new fact seems to be overkill; isn't there some straightforward way to do it in a manifest? – Mei May 24 '11 at 15:14
@David No, there isn't. If you want information from the host, you need facts. I, too, used to think creating facts was overkill, but they are really very easy to create -- particularly if it's just a matter of running some command and getting its output. – Daniel C. Sobral May 24 '11 at 17:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.