Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I moved the production modules and the node definitions to a different directory and now puppet does not work

I moved the production modules and the node definitions to /etc/puppet/prod/modules and /etc/puppet/prod/manifests/nodes I made the change in the puppet.conf but by the looks of certain commands the puppet server still shows the modules in the old places even though I changed them in the puppet.conf and restarted the puppet master process. When I run the commands below they should output /etc/puppet/prod/manifests and /etc/puppet/prod/modules because that is what I put in the puppet.conf file.

[root@ct-eng-pup puppet]# puppet agent --configprint manifestdir /etc/puppet/manifests [root@ct-eng-pup puppet]# puppet agent --configprint modulepath /etc/puppet/modules:/usr/share/puppet/modules [root@ct-eng-pup puppet]# puppet agent --configprint manifest /etc/puppet/manifests/site.pp [root@ct-eng-pup ~]# puppet master --configprint config /etc/puppet/puppet.conf [root@ct-eng-pup ~]# The directory /etc/puppet/prod/manifests where the site.pp file is at also has the nodes directory of all the productions servers, see below.

[root@ct-eng-pup manifests]# ll total 8 drwxr-xr-x. 2 root root 4096 Mar 5 09:59 nodes -rw-r--r--. 1 root root 47 Sep 8 10:04 site.pp

Changes I made in the /etc/puppet/puppet.conf file and then restart the puppet master process. # The default value is '$confdir/manifests'.

manifestdir = /etc/puppet/manifests

manifestdir = /etc/puppet/prod/manifests

# Which port puppet master listens on.
# The default value is '8140'.
# masterport = 8140

# The user puppet master should run as.
# The default value is 'puppet'.
# user = puppet

# The configuration file that defines the rights to the different
# rest indirections.  This can be used as a fine-grained
# authorization system for `puppet master`.
# The default value is '$confdir/auth.conf'.
rest_authconfig = /etc/puppet/auth.conf

# The directory in which YAML data is stored, usually in a subdirectory.
# The default value is '$vardir/yaml'.
yamldir = /var/lib/puppet/yaml

# The search path for modules, as a list of directories separated by the system path separator character. (The POSIX path separator is

':', and the Windows path separator is ';'.) # The default value is '$confdir/modules:/usr/share/puppet/modules'.

modulepath = /etc/puppet/modules:/usr/share/puppet/modules

modulepath = /etc/puppet/prod/modules:/usr/share/puppet/modules

# The entry-point manifest for puppet master. # The default value is '$manifestdir/site.pp'. manifest = /etc/puppet/prod/manifests/site.pp

[root@ct-eng-pup manifests]# pwd /etc/puppet/prod/manifests [root@ct-eng-pup manifests]# ll nodes total 208 -r--r--r--. 1 root root 529 Jan 21 22:46 pdlnx-adpt01.pp -r--r--r--. 1 root root 529 Feb 26 00:32 pdlnx-adpt02.pp -r--r--r--. 1 root root 529 Jan 21 22:50 pdlnx-adpt03.pp -rw-r--r--. 1 root root 345 Feb 7 22:51 pdlnx-amq01.pp -rw-r--r--. 1 root root 345 Dec 18 16:52 pdlnx-amq02.pp -rw-r--r--. 1 root root 345 Feb 26 14:08 pdlnx-amq03.pp -rw-r--r--. 1 root root 305 Feb 5 19:30 pdlnx-apch01.pp -rw-r--r--. 1 root root 306 Feb 5 19:31 pdlnx-apch02.pp -rw-r--r--. 1 root root 306 Feb 27 13:46 pdlnx-apch03.pp -rw-r--r--. 1 root root 635 Dec 26 23:45 pdlnx-csec01.pp -rw-r--r--. 1 root root 635 Dec 26 23:45 pdlnx-csec02.pp -rw-r--r--. 1 root root 635 Feb 26 14:31 pdlnx-csec03.pp -rw-r--r--. 1 root root 637 Dec 26 19:02 pdlnx-cstd01.pp -rw-r--r--. 1 root root 637 Dec 26 19:02 pdlnx-cstd02.pp -rw-r--r--. 1 root root 637 Feb 26 14:32 pdlnx-cstd03.pp -rw-r--r--. 1 root root 345 Dec 18 16:54 pdlnx-fmq01.pp -rw-r--r--. 1 root root 345 Dec 18 16:54 pdlnx-fmq02.pp -rw-r--r--. 1 root root 345 Feb 26 14:32 pdlnx-fmq03.pp -rw-r--r--. 1 root root 593 Dec 26 23:41 pdlnx-fpats01.pp -rw-r--r--. 1 root root 588 Dec 26 23:42 pdlnx-fpats02.pp -rw-r--r--. 1 root root 593 Feb 26 14:32 pdlnx-fpats03.pp -rw-r--r--. 1 root root 334 Jan 18 23:13 pdlnx-intamq01.pp -rw-r--r--. 1 root root 334 Jan 18 23:13 pdlnx-intamq02.pp -r--r--r--. 1 root root 191 Dec 6 14:32 pdlnx-mongo1.pp -r--r--r--. 1 root root 191 Dec 6 14:33 pdlnx-mongo2.pp -r--r--r--. 1 root root 191 Dec 6 14:33 pdlnx-mongo3.pp -rw-r--r--. 1 root root 344 Dec 18 16:56 pdlnx-nhin01.pp -rw-r--r--. 1 root root 344 Dec 18 16:56 pdlnx-nhin02.pp

[root@ct-eng-pup puppet]#

I moved the production modules and the node definitions to a different directory and now puppet does not work

I moved the production modules and the node definitions to /etc/puppet/prod/modules /etc/puppet/prod/modules and /etc/puppet/prod/manifests/nodes /etc/puppet/prod/manifests/nodes I made the change in the puppet.conf but by the looks of certain commands the puppet server still shows the modules in the old places even though I changed them in the puppet.conf and restarted the puppet master process. When I run the commands below they should output /etc/puppet/prod/manifests /etc/puppet/prod/manifests and /etc/puppet/prod/modules /etc/puppet/prod/modules because that is what I put in the puppet.conf file.

[root@ct-eng-pup puppet]# puppet agent --configprint manifestdir
/etc/puppet/manifests
[root@ct-eng-pup puppet]# puppet agent --configprint modulepath
/etc/puppet/modules:/usr/share/puppet/modules
[root@ct-eng-pup puppet]# puppet agent --configprint manifest
/etc/puppet/manifests/site.pp
[root@ct-eng-pup ~]# puppet master --configprint config
/etc/puppet/puppet.conf
[root@ct-eng-pup ~]#
 

The directory /etc/puppet/prod/manifests /etc/puppet/prod/manifests where the site.pp file is at also has the nodes directory of all the productions servers, see below.

[root@ct-eng-pup manifests]# ll
total 8
drwxr-xr-x. 2 root root 4096 Mar  5 09:59 nodes
-rw-r--r--. 1 root root   47 Sep  8 10:04 site.pp

site.pp

Changes I made in the /etc/puppet/puppet.conf file and then restart the puppet master process. process.

    # The default value is '$confdir/manifests'.

'$confdir/manifests'. # manifestdir = /etc/puppet/manifests

/etc/puppet/manifests
    manifestdir = /etc/puppet/prod/manifests

 # Which port puppet master listens on.
 # The default value is '8140'.
 # masterport = 8140

 # The user puppet master should run as.
 # The default value is 'puppet'.
 # user = puppet

 # The configuration file that defines the rights to the different
 # rest indirections.  This can be used as a fine-grained
 # authorization system for `puppet master`.
 # The default value is '$confdir/auth.conf'.
 rest_authconfig = /etc/puppet/auth.conf

 # The directory in which YAML data is stored, usually in a subdirectory.
 # The default value is '$vardir/yaml'.
 yamldir = /var/lib/puppet/yaml

 # The search path for modules, as a list of directories separated by the system path separator character. (The POSIX path separator is

':', and the Windows path separator is ';'.) # The default value is '$confdir/modules:/usr/share/puppet/modules'.

'$confdir/modules:/usr/share/puppet/modules'. # modulepath = /etc/puppet/modules:/usr/share/puppet/modules

/etc/puppet/modules:/usr/share/puppet/modules
    modulepath = /etc/puppet/prod/modules:/usr/share/puppet/modules

# The entry-point manifest for puppet master. # The default value is '$manifestdir/site.pp'. manifest = /etc/puppet/prod/manifests/site.pp

/etc/puppet/prod/manifests/site.pp [root@ct-eng-pup manifests]# pwd /etc/puppet/prod/manifests [root@ct-eng-pup manifests]# ll nodes total 208 -r--r--r--. 1 root root 529 Jan 21 22:46 pdlnx-adpt01.pp -r--r--r--. 1 root root 529 Feb 26 00:32 pdlnx-adpt02.pp -r--r--r--. 1 root root 529 Jan 21 22:50 pdlnx-adpt03.pp -rw-r--r--. 1 root root 345 Feb 7 22:51 pdlnx-amq01.pp -rw-r--r--. 1 root root 345 Dec 18 16:52 pdlnx-amq02.pp -rw-r--r--. 1 root root 345 Feb 26 14:08 pdlnx-amq03.pp -rw-r--r--. 1 root root 305 Feb 5 19:30 pdlnx-apch01.pp -rw-r--r--. 1 root root 306 Feb 5 19:31 pdlnx-apch02.pp -rw-r--r--. 1 root root 306 Feb 27 13:46 pdlnx-apch03.pp -rw-r--r--. 1 root root 635 Dec 26 23:45 pdlnx-csec01.pp -rw-r--r--. 1 root root 635 Dec 26 23:45 pdlnx-csec02.pp -rw-r--r--. 1 root root 635 Feb 26 14:31 pdlnx-csec03.pp -rw-r--r--. 1 root root 637 Dec 26 19:02 pdlnx-cstd01.pp -rw-r--r--. 1 root root 637 Dec 26 19:02 pdlnx-cstd02.pp -rw-r--r--. 1 root root 637 Feb 26 14:32 pdlnx-cstd03.pp -rw-r--r--. 1 root root 345 Dec 18 16:54 pdlnx-fmq01.pp -rw-r--r--. 1 root root 345 Dec 18 16:54 pdlnx-fmq02.pp -rw-r--r--. 1 root root 345 Feb 26 14:32 pdlnx-fmq03.pp -rw-r--r--. 1 root root 593 Dec 26 23:41 pdlnx-fpats01.pp -rw-r--r--. 1 root root 588 Dec 26 23:42 pdlnx-fpats02.pp -rw-r--r--. 1 root root 593 Feb 26 14:32 pdlnx-fpats03.pp -rw-r--r--. 1 root root 334 Jan 18 23:13 pdlnx-intamq01.pp -rw-r--r--. 1 root root 334 Jan 18 23:13 pdlnx-intamq02.pp -r--r--r--. 1 root root 191 Dec 6 14:32 pdlnx-mongo1.pp -r--r--r--. 1 root root 191 Dec 6 14:33 pdlnx-mongo2.pp -r--r--r--. 1 root root 191 Dec 6 14:33 pdlnx-mongo3.pp -rw-r--r--. 1 root root 344 Dec 18 16:56 pdlnx-nhin01.pp -rw-r--r--. 1 root root 344 Dec 18 16:56 pdlnx-nhin02.pp

[root@ct-eng-pup puppet]#

pdlnx-nhin02.pp [root@ct-eng-pup puppet]#