as a puppet newbie, I have a problem including the stdlib plugin
I would like to use stdlib's file_line, thus I try to include stdlib and call it
class service_mon
{
include stdlib
file_line
{
"${name}_services": path=> ...
}
}
However, I get an error message, that stdlib cannot been found
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class stdlib for my.node.name at /etc/puppet/workspace/dev/src/modules/mymanifest/manifests/deploy.pp:87 on node my.node.name
which makes me wonder since stdlib should be installed(?) ...or?
puppet module install puppetlabs-stdli
puppet module list
/etc/puppet/modules
└── puppetlabs-stdlib (v4.2.2)
/usr/share/puppet/modules (no modules installed)
puppet config print modulepath
/etc/puppet/modules:/usr/share/puppet/modules
So, I guess in principle all necessary files are 'there' but how can I convince Puppet to include stdlib as well?
Puppet modules do not work like java modules - include stdlib
would only make sense if there actually was a class stdlib
in the module which did something useful, which is not the case.
Note: Many Puppet modules do have such a class that serves as the central entry point, but stdlib
is a notable exception.
You can use the parser functions from stdlib by just calling them. As for the types, those just become available to Puppet if
$modulepath
andpluginsync
enabled on your agentsYou can use file_line
without any ado.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With