I am new to Puppet, and I am trying to install a file if a package is installed. So in pseudocode:
IF postfix is installed DO
touch /tmp/wehavepostfix
DONE
I can do something like:
file { '/tmp/wehavepostfix':
ensure => file,
content => "foobar",
require => Package['postfix'],
}
However, this requires something like:
package { 'postfix':
ensure => installed,
}
Now, the issue I am facing is that I do not want to install Postfix. So I dont want to set "ensure => installed". However, I do not want to uninstall it when it is installed either.
Basically, I want Puppet to do nothing with the package, but I do want to be able to check whether it is installed or not.
I am aware that I can install custom Facters. However, I think this is such a basic check that I can hardly believe this has to be done with a facter.