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
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