/opt/puppetlabs/bin/puppet module install <name of module>
/opt/puppetlabs/bin/puppet module uninstall <name of module>
Resource: https://www.puppetcookbook.com/posts/installing-modules-from-the-puppet-forge.html
Resource: https://puppet.com/docs/puppet/5.3/modules_installing.html
Run this on the puppet master:
puppet config print modulepath
Resource: https://puppet.com/docs/puppet/5.5/dirs_modulepath.html
By default, puppet module install installs modules into the first directory
in the Puppet modulepath, which defaults to $codedir/environments/production/modules.
To change this, set the modulepath in /etc/puppetlabs/code/environments/{environment_name}/environment.conf
puppet parser validate /etc/puppetlabs/code/environments/production/modules/hello_world/manifests/init.pp
puppet apply --noop /etc/puppetlabs/code/environments/production/modules/hello_world/manifests/init.pp
puppetserver ca list --all
For puppermasters (older):
Get the information from site.pp:
grep -io 'node .* ' /etc/puppet/manifests/site.pp
Resources: https://www.linuxnix.com/puppet-list-all-the-nodes-in-puppet-master/
puppetserver ca clean --certname <name of node>
init.pp:
class base (){
class{'::base::config':}
}
packages.pp:
class base::packages inherits base {
[
'cmake',
'jdk',
'vim',
].each |$pkg| {
package { $pkg:
ensure => latest,
name => $pkg,
provider => 'yum'
}
}
}
notify { 'Machine Information':
name => 'mach_info',
message => "Running on ${::hostname} in the ${::environment} environment",
withpath => true,
}
puppet agent --configprint runinterval
Resource: https://ask.puppet.com/question/2451/how-do-you-change-the-runinterval/
puppet agent -t --environment development