Posts

Showing posts with the label search modules

Featured Post

Directory environments in Puppet

Environments are individual groups of Puppet agents each environment have there own completely different manifests and module-paths. This basically is useful for testing changes to our Puppet code before implementing them on production machines. There are two types of implementation of environments structure in Puppet one if directory based and another is config file based here we will see bit of an insight about directory based. As usual for more information about this you can visit puppetlabs official website. On the master node: Append following details in puppet.conf which is placed under /etc/puppet or /etc/puppetlabs/puppet:     Under [main] section add a variable called confdir with value as /etc/puppet or /etc/puppetlabs/puppet     confdir=/etc/puppet Then add information regarding environments/manifests and modulepath in it.      #environments     environmentpath = $confdir/environments  ...

Directory environments in Puppet

Environments are individual groups of Puppet agents each environment have there own completely different manifests and module-paths. This basically is useful for testing changes to our Puppet code before implementing them on production machines. There are two types of implementation of environments structure in Puppet one if directory based and another is config file based here we will see bit of an insight about directory based. As usual for more information about this you can visit puppetlabs official website. On the master node: Append following details in puppet.conf which is placed under /etc/puppet or /etc/puppetlabs/puppet:     Under [main] section add a variable called confdir with value as /etc/puppet or /etc/puppetlabs/puppet     confdir=/etc/puppet Then add information regarding environments/manifests and modulepath in it.      #environments     environmentpath = $confdir/environments  ...

Puppet modules???

*Modules in puppet* Modules are a way of arranging manifests/files/templates in puppet. Why they are arranged like this?? So that they can be automatically called by the puppet master when needed. What is the location of module?? Default location, you can find it by firing below command: [root@puppet modules]# puppet master --genconfig | grep modulepath     modulepath = /etc/puppet/modules:/usr/share/puppet/modules [root@puppet modules]# User defined location, If in-case you want to use the user defined location to fetch the modules so that puppet master can use it you need to use a option called --modulepath while firing the command. [root@puppet manifests]# puppet apply site.pp --modulepath=/tmp/mods/ notice: Finished catalog run in 0.26 seconds [root@puppet manifests]# Structure of a module: modules/ └── ntp     ├── files     │   ├── ntp.conf.debian     │   └── ntp.conf.el     ├──...