puppetlabs-toy-chest / puppetlabs-package_updates

Package update discovery Puppet Face and custom Facter fact
12 stars 6 forks source link

Ensure facts.d directory exists #9

Closed ccaum closed 8 years ago

ccaum commented 8 years ago

On default installs of the Puppet AIO agent, the /etc/puppetlabs/facter/facts.d directory is not present. Users may create this directory with Puppet or manually, but we cannot gaurantee that it exists. This means the cron job cannot be gauranteed to work.

This commit creates an exec resource that ensures the directory exists. An exec is used rather than a file resource because we cannot know if the directory is managed elsewhere in the catalog. Since this is a harmless operation, it's safe to use an exec in addition to (potentially) a file resource