When I am executing mco puppet runonce --environment=development -I host_name on puppet master. It shows that catalogue is successfully applied. But it is not applying the classes included in site.pp. But it is working for other environments.
Below is my Puppet configuration on master
[main] certname = <agent_cert> # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet #logdir = /smapp/puppet/var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet #rundir = /smapp/puppet/var/run/puppet # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = $vardir/ssl #ssldir = /smapp/puppet/ssl archive_files = true archive_file_server = server_url #pidfile = /var/run/puppet/agent.pid server = server_url user = puppet group = puppet basemodulepath = /etc/puppet/modules environmentpath = /etc/puppet/environments [agent] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is '$confdir/classes.txt'. classfile = $vardir/classes.txt # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is '$confdir/localconfig'. localconfig = $vardir/localconfig #report = true pluginsync = true environment = production [master] certname = <master_cert> always_cache_feature = true manifest = /etc/puppet/site.pp #pidfile = /var/run/puppet/master.pid
Agent Config
[main] # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet basemodulepath = /etc/puppet/modules user = puppet group = puppet archive_files = true vardir = /var/lib/puppet server = server_url # Where SSL certificates are kept. # The default value is '$confdir/ssl'. certname = client_cert ssldir = $vardir/ssl # environment = production [agent] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is '$confdir/classes.txt'. classfile = $vardir/classes.txt pluginsync = true # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is '$confdir/localconfig'. localconfig = $vardir/localconfig report = true environment = production
It is working when I use Production environment.
For both development and production environments same class are present.
My environment.conf
manifest = /etc/puppet/environments/development/manifest/ modulepath = /etc/puppet/environments/development/modules/ #this is added to enable some of the ruby features like loop,etc. parser = future
0 comments:
Post a Comment