[Puppet Users] Re: File handling
Hi Raj, In puppet you can not declare the same resource twice in a manifests. Workaround, You have to use exec resource which execute the command required for deletion of file Here you have to order all resource like file deletion( exec resource) has to be occurs at the last.. Thanks, Rahul On Thursday, November 28, 2013 1:12:09 PM UTC+5:30, Raj kumar V wrote: Hi There, I am trying to do the following using puppet 1. Create a dir call mydir 2. Download a file from internet using Exec 3. Change the mode of the file 3. Install it and ensure running and service is enabled. 4. Delete it the installer file. When I do this until 3 rd step I am fine. But when I create the file resource again for deleting the installer files, it says it is already declared and cannot redeclare. Is there a option to fix this or I have to change the logic? Thanks Raj -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d608e9b4-4385-4697-b07c-eef04364dd3d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: nodes.pp on puppetmaster vs. puppet agent on puppet client
Hi Stuart, You don't have to do /etc/init.d/puppet restart on client machine, whenever puppet agent run/ fetches the catalog from PM using latest manifests. Thanks, Rahul Khengare NTT DATA OSS Center, Pune, India. On Tuesday, November 26, 2013 4:17:16 AM UTC+5:30, Stuart Cracraft wrote: If I change nodes.pp on the PM, do I have to do an /etc/init.d/puppet restart on the puppet client to get it to receive the changes? I.e. does it have the old manifests/modules until the restart is done? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/51eb51d4-75a9-4e8d-abb1-79a3610a9aed%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: puppet agent reporting
Hi Stuart, Take a look on reporting facility present in puppet, http://docs.puppetlabs.com/guides/reporting.html It might help you. Thanks, Rahul Khengare On Tuesday, November 26, 2013 2:41:01 AM UTC+5:30, Stuart Cracraft wrote: Hi, I want to report my agent's puppet status not to its own /var/log/messages but to the puppet master's /var/log/messages. What's best practice? Stuart -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d30ea382-5380-4b1c-93a6-f6148dce1b76%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Applying a manifest on a remote node
Hi Stuart, I have a manifest which, on the puppet master, lives in /etc/puppet/modules/somename/manifests/init.pp On nodes which the puppet master has, I don't see a similar directory. Puppet manifests are present only on puppet master What is the way to apply the above manifest on the agent? you can use/ include module in puppet manifests and run the puppet agent Refer, http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html Thanks, Rahul Khengare -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7560c09e-145f-412b-82bc-06128c1a76b5%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: register question
Hi Paras, Whenever puppet agent requested catalog from puppet master then it first check the certificate information present or not(agent registered or not). At time of first run puppet agent request for certificate and skip the execution of puppet manifests catalog, This happen until puppet master sign (register) the certificate request of puppet agent. When you sign the certificate request of agent on master then only it execute the puppet manifests. If you dont want to apply actual changes of puppet manifests but want to check execution flow the use --noop option. # puppet agent --server puppetmaster --waitforcert 60 --test --noop Refer http://docs.puppetlabs.com/learning/agent_master_basic.html for working of puppet master-agent working. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thursday, October 31, 2013 2:14:59 AM UTC+5:30, Paras pradhan wrote: Hi, When I register to master using: puppet agent --server puppetmaster --waitforcert 60 --test , it does register but also runs: puppet agent -t internally. I *only* need to register to master. is it possibie? Thanks Paras. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/cb04d79a-1fae-43e9-86e3-f18b69ed408d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet agent not running automatically
Hi Michael, puppetd daemon run in background when we configure to run automatically. It does not send the output of catalog running to standard output terminal. runinterval =1800 This specify that on your puppet client manifests catalog is deploye after every 30 minutes(1800 Second). Refer http://docs.puppetlabs.com/references/latest/configuration.html#runinterval Try enabling the runlevel of puppet service # chkconfig puppet --list Hope this will help. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet agent not running automatically
Hi Michael, puppetd daemon run in background when we configure to run automatically. It does not send the output of catalog running to standard output terminal. runinterval =1800 This specify that on your puppet client manifests catalog is deploye after every 30 minutes(1800 Second). Refer http://docs.puppetlabs.com/references/latest/configuration.html#runinterval Try enabling the runlevel of puppet service ON # chkconfig puppet on Hope this will help. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Friday, October 25, 2013 9:32:57 PM UTC+5:30, Michael Buckner wrote: The puppet agent is already running, it just never actually checks in with the puppetmaster unless I manually run puppet agent -t Puppet was install automatically via the foreman-installer. Here are the contents of [agent] in puppet.conf: [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 # Disable the default schedules as they cause continual skipped # resources to be displayed in Foreman - only for Puppet = 3.4 default_schedules = false report = true pluginsync = true masterport = 8140 environment = production certname= puppet.mycompany.com server = puppet.mycompany.com listen = false splay = false runinterval = 1800 noop= false show_diff = false On Friday, October 25, 2013 11:55:31 AM UTC-4, puppetstan wrote: Hi, When you doing /etc/init.d/puppet start it s not good? regards Le vendredi 25 octobre 2013 16:47:15 UTC+2, Michael Buckner a écrit : Brand new install or Foreman/Puppet. Puppet agent runs fine manually but does not run automatically. Any suggestions? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Best practice to manage multi-OS for the same module?
Hello Aurélien, You can write the puppet manifests in a such way that it execute specific resources for particular OS. Puppet variables, conditional statements like IF, CASE, SELECTOR and FACTS helps you to write the conditional manifests. Refer following links to understand how to manage or write the conditional puppet manifests, 1. http://docs.puppetlabs.com/learning/variables.html 2. http://docs.puppetlabs.com/puppet/2.7/reference/lang_conditional.html Hope this will help to achieve your goal. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thursday, October 24, 2013 3:43:34 PM UTC+5:30, Aurélien Degrémont wrote: Hello all, As said in the subject, I did not find in puppet doc the official recommendation in how multi-os should be handled in module manifests. Let's say I want my module foo having classes that could be used on Debian, RHEL6 and Fedora 10 to 18. What would be the recommended way to manage differences between all of these systems? I know there is conditionals usable in classes, but is this the recommended way? Also, when I decommission Fedora10 by example, and I do not want to manage it in all my modules anymore, as this is unneeded complexity, I need to modify all the if statement in all modules to remove fedora10 special treatments? Aur�lien -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Few questions about Puppet
Hi Shazni, 1. I've a json file shown below that I need to modify, when I run my puppet script. { assets:{ ignore:[], icons:{ gadget:icon-dashboard, ebook :icon-ebook, site :icon-site, default:icon-dashboard } } } I need to add a new entry in the mid of icons, say a:b. How do I do this? In this case you can explore the puppet *augeas* resource type. It will allow you to change the file contents. But you have to learn the augeas tool format. Refer, http://docs.puppetlabs.com/references/latest/type.html#augeas http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas#Using+Puppet+with+Augeas 2. I replace a directory using another directory. And I need to do the same after doing some other additions to configuration. I get the following error when I apply the 'file resource twice. Duplicate declaration: File[/home/shazni/Documents/Junk/wso2greg-4.6.0/samples/asset-models/ApplicationModel/] is already declared in file /home/shazni/.puppet/modules/gregstore/manifests/init.pp at line 85; cannot redeclare at /home/shazni/.puppet/modules/gregstore/manifests/init.pp:108 on node wso2-thinkpad-t530.private.wso2.com My script does this. file { $StoreHome/repository/deployment/server/jaggeryapps/store/extensions/assets/servicex: ensure = directory, recurse = true, purge = true, force = true, source = puppet:///modules/gregstore/setup-beta2/store/servicex/, } // Some more work file { $StoreHome/repository/deployment/server/jaggeryapps/store/extensions/assets/servicex: ensure = directory, recurse = true, purge = true, force = true, source = puppet:///modules/gregstore/setup-beta2/store/servicex/, } How to solve this issue? puppet does not allow you to perform operation on same file twice in manifests. You have to do the all operations on single file in one file resource(*Exactly once*) 3. I want to run a script file, which in turn invoke some java class files. How to to do it in the same file? Transfer the script file to puppet agent/client using *FILE* resource and then use *EXEC* resource to execute that script file. Hope this will help. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Warning: appears to have a negative number of dependencies
Hi Yan, Can you provide details about your manifests. May be manifests helps us to find the solution to problem. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Saturday, October 12, 2013 6:22:00 AM UTC+5:30, Yan Xiaofei wrote: Hello After add some packagelist to puppet class. I get lots of warning message appears to have a negative number of dependencies. My puppet master and agent version are 3.3.1. Here is the log out: [root@gpu022 ~]# puppet agent --test Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Caching catalog for gpu022.ihep.ac.cn Info: Applying configuration version '1381473104' Warning: /Stage[main]/Afs::Client/Service[afs]: appears to have a negative number of dependen Warning: Class[Afs::Client]: appears to have a negative number of dependencies Warning: Class[Afs::Client]: appears to have a negative number of dependencies Warning: /Stage[main]/Afs::Client/File[ThisCell]: appears to have a negative number of depend Warning: /Stage[main]/Afs::Client/File[CellServDB]: appears to have a negative number of depe Warning: Class[Afs::Client]: appears to have a negative number of dependencies Warning: Class[Afs::Client]: appears to have a negative number of dependencies Warning: Stage[main]: appears to have a negative number of dependencies Warning: Stage[main]: appears to have a negative number of dependencies Warning: Stage[main]: appears to have a negative number of dependencies Warning: Stage[main]: appears to have a negative number of dependencies Warning: /root/wn58packages.lst: appears to have a negative number of dependencies Warning: Class[Wn58packages]: appears to have a negative number of dependencies Warning: Stage[main]: appears to have a negative number of dependencies Notice: Finished catalog run in 150.52 seconds -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Duplicate declaration for files.
Hello Mike, Here the baseos file[/etc/hosts] resource get propagated to all the nodes because of inheritance. You again changing the same file in newnode.example.com again. Puppet does not allow to edit the same file twice (same resource again) in single run. Work around to that, Create a new folders for each node in baseos module as per node name and put node specific /etc/hosts file in that folder. e.g baseos node1.example.com - hosts node2.example.com - hosts node3.example.com - hosts newnode.example.com - hosts All nodes inherit basenode, Inside the class baseos i've declared the archive host table and various other parameters [.] file { /etc/hosts: ensure = present, owner = root, group = root, mode= '664', # source = puppet:///modules/baseos/hosts, source = puppet:///modules/baseos/$hostname/hosts, Add $hostname facter as above in source parameter. This will add dynamic nature to source. Source attribute resolve to - puppet:///modules/baseos/node1.example.com/hosts - puppet:///modules/baseos/node2.example.com/hosts - puppet:///modules/baseos/node3.example.com/hosts - puppet:///modules/baseos/newnode.example.com/hosts depending upon the node(host) name. Hope this will solve your problem. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet controling Network Interfaces OS:CentOS 5.x
Hi James, You can take a look on network modules present on puppet forge, 1. https://forge.puppetlabs.com/adrien/network 2. https://forge.puppetlabs.com/razorsedge/network hope this will help. Thanks and Regards, Rahul Khengare, NTTDATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Newbie basic parameterized class usage question
Hi Patrick, You calling the filesys_group_acl class in wrong way. Way you are using is for function/defined type. Make following change in your manifests. Here's the contents of tws_node's init.pp: class tws_node { $userhome=/opt/IBM/TWS # filesys_group_acl { ibmtm_acl_group_ibmtm : Change calling of class method : * class { filesys_group_acl: * #subscribe = File[$userhome], dir = $userhome, group = ibmtm, } } If you want to use filesys_group_acl resource multiple times then change class to defined type. http://docs.puppetlabs.com/learning/definedtypes.html I hope this will help. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: best practice for managing multiple stanzas within a config file?
Hi Thomas, You can make use of *augeas* resource type of puppet yo manage the config files. Refer following links for augeas resource type and project, http://docs.puppetlabs.com/references/latest/type.html#augeas http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Tuesday, October 1, 2013 4:05:20 AM UTC+5:30, Thomas wrote: What is the best way to manage multiple stanza within a config file? For a splunk configuration file (inputs.conf) I need to manage some thing like [monitor://var/log] blacklist = someRegularExpression whitelist = someOtherRegularExpression [monitor://var/lib/ourApp] There can be multiple monitor stanzas and each may or may not have a whitelist or blacklist. I haven't found any thing on the forge or in this group regarding best practice for managing stanzas within a config file. I've tried a few different combinations of templates, concat and define and haven't found a clean solution yet to construct the stanza. Any suggestions would be appreciated. Thanks! Thomas -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: how can I test and fix all cert and puppetdb requirements
Hi Anup, For connection refused problem, try turning off your firewall/iptables using command, # service iptables stop Also try disbling the selinux settings in /etc/selinux/config file SELINUX = disabled OR Run command, # setenforce 0 Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thursday, September 26, 2013 5:59:27 AM UTC+5:30, Anup Singh wrote: Info: Retrieving plugin Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate: Connection refused - connect(2) Error: /File[/var/lib/puppet/lib]: Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:// puppet.devprojecteagle.com/plugins: Connection refused - connect(2) Error: Failed to apply catalog: Connection refused - connect(2) My cert root@mb-0-001-m-ins-puppetmaster-1:~# puppet cert list --all + mb-0-001-m-ins-puppetmaster-1.devprojecteagle.com (SHA1) BE:59:02:33:11:9A:EC:92:68:4F:0F:05:A6:8D:83:05:8F:73:8C:F3 (alt names: DNS:mb-0-001-m-ins-puppetmaster-1.devprojecteagle.com, DNS: puppetmaster.devprojecteagle.com) PuppetDB not running root@mb-0-001-m-ins-puppetmaster-1:~# sudo puppet resource service puppetdb ensure=stopped Error: /Service[puppetdb]: Could not evaluate: Could not find init script or upstart conf file for 'puppetdb' Error: Could not run: Could not find init script or upstart conf file for 'puppetdb' root@mb-0-001-m-ins-puppetmaster-1:~# sudo puppet resource service puppetdb ensure=running enable=true Error: /Service[puppetdb]: Could not evaluate: Could not find init script or upstart conf file for 'puppetdb' Error: Could not run: Could not find init script or upstart conf file for 'puppetdb' root@mb-0-001-m-ins-puppetmaster-1:~# More i dig into it worst it is getting -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Noob question about the ${name} variable
Hi John, Read my previous reply, file { '/etc/httpd/conf.d/ssl.conf' : ensure = file , mode= 0644 , owner = 0 , group = 0 , content = template ( ${module_name}${name}.erb ) , notify = Service['httpd'] , require = Package['httpd'] , } The *'/'* is missing in between ${module_name} and ${name} Thanks and Regards, Rahul Khengare -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: puppet client connection refused when I use puppet kick form puppet master
HI Dilip, Can you provide the puppet,conf file. Check the parameter server = puppetmaster.example.org under the [main] section in puppet.conf file. Otherwise puppet client trying to connect default host puppet when puppet agent being kick. Thanks and Regards, Rahul Khengare On Thursday, September 26, 2013 12:54:54 PM UTC+5:30, Dilip Varma wrote: Hi, I've done some cofiguration in /etc/puppet/manifests/site.pp file i.e class toolbox { file { '/usr/local/sbin/puppetsimple.sh': owner = root,group = root,mode = 0755,content = #!/bin/bash apt-get install zip\n } } node 'admin.local' { include toolbox } Here admin.local is my PUPPET AGENT.. my job is to kick this job to puppet agent from puppet master.for this i have ran *r...@puppetmaster.example.org#puppet kick admin.local* *Triggering admin.local Host admin.local failed: Connection refused - connect(2) admin.local finished with exit code 2 Failed: admin.local* i got this error. *Additional Info*:puppet master and agent are in the same network,pinging each other and configured password less logins also.. Please find the attachment regarding the puppet error mentioned above. Thanks in advance Dilip -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: puppet client server connection refused when I use puppet kick
Check the parameter server = puppetmaster.example.org under the [main] section in puppet.conf file. Otherwise puppet client trying to connect default host puppet when puppet agent being kick. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Sunday, January 15, 2012 7:01:41 PM UTC+5:30, tomkap12 wrote: I have very strange problem. I set up puppet client on serveral servers but have problem with one of them. When I invoke: root@www ~ # puppet agent --server puppetmaster.domain.ltd --test notice: Ignoring --listen on onetime run info: Caching catalog for puppetclient.domain.ltd info: Applying configuration version '132631' notice: Finished catalog run in 3.15 seconds everything works ok. New changes are applied to system. When I try to pull changes to client from server: root@www ~ # puppet kick puppetclient.domain.ltd I got errors on client's syslog: Jan 15 14:01:23 www puppet-agent[20903]: triggered run Jan 15 14:01:24 www puppet-agent[20903]: Could not retrieve catalog from remote server: Connection refused - connect(2) Jan 15 14:01:24 www puppet-agent[20903]: Using cached catalog Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Cronapt/ File[/etc/cron.daily/cronapt]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///cronapt/cronapt: Connection refused - connect(2) at /etc/puppet/modules/cronapt/ manifests/init.pp:7 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ File[/usr/lib/nagios/plugins/]) Failed to generate additional resources using 'eval_generate: Connection refused - connect(2) Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ File[/usr/lib/nagios/plugins/]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///nagios/usr/lib/nagios/plugins: Connection refused - connect(2) at /etc/puppet/modules/nagios/ manifests/init.pp:27 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ File[/etc/nagios/nrpe.cfg]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///nagios/etc/nagios/nrpe.cfg: Connection refused - connect(2) at /etc/puppet/modules/nagios/ manifests/init.pp:18 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ Exec[/etc/init.d/nagios-nrpe-server reload]) Dependency File[/etc/ nagios/nrpe.cfg] has failures: true Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ Exec[/etc/init.d/nagios-nrpe-server reload]) Skipping because of failed dependencies Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Apache2/ File[/etc/apache2/conf.d/deny.conf]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///apache2/etc/apache2/conf.d/deny.conf: Connection refused - connect(2) at /etc/puppet/modules/apache2/manifests/init.pp:7 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Apache2/ Service[apache2]) Dependency File[/etc/apache2/conf.d/deny.conf] has failures: true Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Apache2/ Service[apache2]) Skipping because of failed dependencies Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ File[/etc/nagios/cfg.d/]) Failed to generate additional resources using 'eval_generate: Connection refused - connect(2) Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Nagios/ File[/etc/nagios/cfg.d/]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///nagios/etc/nagios/cfg.d: Connection refused - connect(2) at /etc/puppet/modules/nagios/ manifests/init.pp:37 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Apache2/ File[/etc/apache2/.htpasswd]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///apache2/etc/apache2/.htpasswd: Connection refused - connect(2) at /etc/puppet/modules/apache2/ manifests/init.pp:31 Jan 15 14:01:24 www puppet-agent[20903]: (/Stage[main]/Apache2/ File[/usr/share/phpmyadmin/.htaccess]) Could not evaluate: Connection refused - connect(2) Could not retrieve file metadata for puppet:///apache2/usr/share/phpmyadmin/.htaccess: Connection refused - connect(2) at /etc/puppet/modules/apache2/manifests/init.pp:23 Jan 15 14:01:24 www puppet-agent[20903]: Finished catalog run in 0.33 seconds Jan 15 14:01:24 www puppet-agent[20903]: Could not send report: Connection refused - connect(2) Here are configuration files at puppetclient.domain.ltd puppet.conf [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates prerun_command=/etc/puppet
Re: [Puppet Users] puppet client connection refused when I use puppet kick form puppet master
Have you try adding server parameter as i said in earlier post. On Thu, Sep 26, 2013 at 2:44 PM, Dilip Varma dilippand...@gmail.com wrote: Hi *puppetmaster#vim /etc/puppet/puppet.conf* [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post listen = true [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY puppetmaster#vim /etc/puppet/auth.conf [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post listen = true [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY *puppetmaster#vim /etc/puppet/auth.conf* # This is an example auth.conf file, it mimics the puppetmasterd defaults # # The ACL are checked in order of appearance in this file. # # Supported syntax: # This file supports two different syntax depending on how # you want to express the ACL. # # Path syntax (the one used below): # - # path /path/to/resource # [environment envlist] # [method methodlist] # [auth[enthicated] {yes|no|on|off|any}] # allow [host|ip|*] # deny [host|ip] # # The path is matched as a prefix. That is /file match at # the same time /file_metadat and /file_content. # # Regex syntax: # - # This one is differenciated from the path one by a '~' # # path ~ regex # [environment envlist] # [method methodlist] # [auth[enthicated] {yes|no|on|off|any}] # allow [host|ip|*] # deny [host|ip] # # The regex syntax is the same as ruby ones. # # Ex: # path ~ .pp$ # will match every resource ending in .pp (manifests files for instance) # # path ~ ^/path/to/resource # is essentially equivalent to path /path/to/resource # # environment:: restrict an ACL to a specific set of environments # method:: restrict an ACL to a specific set of methods # auth:: restrict an ACL to an authenticated or unauthenticated request # the default when unspecified is to restrict the ACL to authenticated requests # (ie exactly as if auth yes was present). # ### Authenticated ACL - those applies only when the client ### has a valid certificate and is thus authenticated # allow nodes to retrieve their own catalog (ie their configuration) path ~ ^/catalog/([^/]+)$ method find allow $1 # allow nodes to retrieve their own node definition path ~ ^/node/([^/]+)$ method find allow $1 # allow all nodes to access the certificates services path /certificate_revocation_list/ca method find allow * # allow all nodes to store their own reports path ~ ^/report/([^/]+)$ method save allow $1 # inconditionnally allow access to all files services # which means in practice that fileserver.conf will # still be used path /file Thanks, Dilip allow * ### Unauthenticated ACL, for clients for which the current master doesn't ### have a valid certificate; we allow authenticated users, too, because ### there isn't a great harm in letting that request through. # allow access to the master CA path /certificate/ca auth any method find allow * path /certificate/ auth any method find allow * path /certificate_request auth any method find, save allow * # this one is not stricly necessary, but it has the merit # to show the default policy which is deny everything else #path / path /run auth any These are my puppet.conf and auth.conf of puppet master... Please find the solution.. On Thu, Sep 26, 2013 at 12:54 PM, Dilip Varma dilippand...@gmail.comwrote: Hi, I've done some cofiguration in /etc/puppet/manifests/site.pp file i.e class toolbox { file { '/usr/local/sbin/puppetsimple.sh': owner = root,group = root,mode = 0755,content = #!/bin/bash apt-get install zip\n } } node 'admin.local' { include toolbox } Here admin.local is my PUPPET AGENT.. my job is to kick this job to puppet agent from puppet master.for this i have ran *r...@puppetmaster.example.org#puppet kick admin.local* *Triggering admin.local Host admin.local failed: Connection refused - connect(2) admin.local finished with exit code 2 Failed: admin.local* i got this error. *Additional Info*:puppet master and agent are in the same network,pinging each other and configured password less logins also.. Please find the attachment regarding the puppet error mentioned above.
[Puppet Users] Re: Painful packages
Hi LenR, You do not required to uninstalled the package if you want to upgrade it. Puppet package resource automatically upgrade/install the* latest version package* present in the yum repos, if you specify ensure = 'latest'. You can also specify the package version along with name and make ensure = present. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Wednesday, September 25, 2013 9:00:54 AM UTC+5:30, LenR wrote: I need to upgrade a package, but it's later versions are packaged differently, can I do something like package { zabbix-agent.1.8.15: ensure = absent } some repo ensured present... package {zabbix-agent, zabbix-sender, zabbix-get: ensure = latest } The problem is that a prior repo had all 3 replacement components in the same rpm, so I can't just upgrade from 1.8 era to 2.x. I would add ordering to this also. Thanks -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Noob question about the ${name} variable
file { '/etc/httpd/conf.d/ssl.conf' : ensure = file , content = template ( ${module_name}{$name}.erb ) , } Here $name expands to apache, so the filename passed to template() is apacheapache.erb, rather than the expected and desired value apache/etc/httpd/conf.d/ssl.conf.erb. Here you have syntax problem try, content = template ( ${module_name}/${name}.erb ) , Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet exec error on windows 2008 server
Hi Harsh, Refer *exec* and *shell builtins* sections present in the http://docs.puppetlabs.com/windows/troubleshooting.html, This might help troubleshooting your problem. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Tuesday, September 24, 2013 2:20:38 PM UTC+5:30, Harsh Desai wrote: Hi I am stuck at a very basic issue in my the following exec resource. I am executing this on windows 2008 R2 server. When I apply this manifest, puppet always complains saying dcpromo.exe is not an internal or external command. I exactly appended the path of dcpromo.exe to the 'path' variable, but still it can't find it. I even tried the cmd /c trick in the command with no luck. exec { 'install_dc': command = dcpromo.exe /unattend:dc_unattend.txt, path= C:\\;C:\\Windows\System32\\;${path}, timeout = 2400, } Help would be appreciated. Thanks Harsh -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: question about override parameter in node define
hi ch Huang, Here in this case you have to use parameterised class concept. Refer http://docs.puppetlabs.com/guides/parameterized_classes.html for parameterised classes concept. You can restructure your manifests to solve your issue. Refer following manifests, *init.pp file* here we pass the *master* parameter to class and inherits params class. class hadoop ( $master = $hadoop::params::master, ) inherits hadoop::params { file { /tmp/conftest: ensure = 'file', content = ${master}, } } *node.pp* node 'default' { class {hadoop: # pass the master parameter to hadoop class it will override the value present in the params file, # if we are not passing the master parameter then it take default value present in the params.pp file master = 'mymaster', } } node 'bm' inherits 'default' { } *params.pp* class hadoop::params { $master = $::hostname ? { default = 'HM', } } Hope this would help. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Tuesday, September 24, 2013 11:51:29 AM UTC+5:30, ch huang wrote: i expect the file /tmp/conftest content will be mymaster not default HM on node bm ,but fail,anyone can help? here my init.pp class hadoop { require hadoop::params file { /tmp/conftest: ensure = 'file', content = $hadoop::params::master, } } here my node.pp node 'default' { include hadoop } node 'bm' inherits 'default' { $hadoop::params::master = 'mymaster' } here is my params.pp class hadoop::params { $master = $::hostname ? { default = 'HM', } } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: config print seems to be broken
Hi Brandon, puppet config print option print the environment variable of [main] section only it is not overridden by another config block. Check the config block of environment variable present in puppet.conf file. Read following documentation of puppet on environment, http://docs.puppetlabs.com/guides/environment.html Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Saturday, September 21, 2013 2:44:41 AM UTC+5:30, Brandon Metcalf wrote: Am I missing something or is this behavior broken: $ puppet -V 3.2.3 $ grep environment /etc/puppet/puppet.conf environment = bmetcalf $ puppet config print environment production Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Executing command via puppet !
Hi Adeel, You can send the manifests execution reports to puppet master. For the execution report files refer /var/lib/puppet/reports directory. For that you have to add report=true in /etc/puppet/puppet.conf file # # /etc/puppet/puppet.conf file # [agent] report =true From the reports .yml files you can extract the messages you need. Refer http://docs.puppetlabs.com/guides/reporting.html for details about report mechanism in puppet. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Monday, September 16, 2013 5:48:24 PM UTC+5:30, Adeel Bhatti wrote: It adds the entry in the log file but locally, I want to have agent's entry on the puppet server's log file !! is it possible ? Adeel On Monday, September 16, 2013 2:08:28 PM UTC+2, Sneha More wrote: Hi, You can get response from puppet, depend upon what you want to achieve. *1st case* : if you want to log the output of command nginx -t, you can use attribute logoutput = true or false of exec resource Please refer http://www.puppetcookbook.com/posts/exec-output-logging.html for deatailed description. *2nd case* : if you want to execute something after finding file containing configuration error then you can use attribute onlyif = command of exec resource Please refer http://www.puppetcookbook.com/posts/exec-onlyif.html for deatiled description Thanks Regards, Sneha More, NTT DATA GTS, OSS Center India, (Pune). On Monday, September 16, 2013 11:57:12 AM UTC+5:30, Adeel Bhatti wrote: Hi, Is it possible to get response of a command from puppet ? For example if I run nginx -t it would give some details about the configurations i.e. if configuration has some error then which file has the error ! Regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Need help with defining same package resource in two modules
Refer http://docs.puppetlabs.com/puppet/2.7/reference/lang_virtual.html this for creating and realizing the virtual resource. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Tue, Sep 17, 2013 at 12:29 PM, Martin Alfke tux...@gmail.com wrote: On Sep 17, 2013, at 8:18 AM, Rahul Khengare rahulk1...@gmail.com wrote: Hi Mani, Case2: A=true, when B runs it fails Error 400 on SERVER: Duplicate definition: Package[pkg1] is already defined in file A at line ; cannot redefine at How do i overcome this issue to complete the workflow of module B in both cases (where A is enabled or disabled) If module A get enable then re-declaration of package[pkg1] resource is happening. Here you can disable the module B. Make your package resource virtual and realise the resource in both modules. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/mOHDwWzINdc/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet agent and puppet master
Hi Adeel, First time you have to access the puppet agent and do the certificate generation and signing on puppet master. After that you can set the runinterval parameter in pupet.conf file( puppet agent request the puppet master manifests at defined time interval). This will automatically request the manifests from puppet master continuously. puppet.conf runinterval =XX (default 30 minute) This setting can be a time interval in seconds(30 or 30s), minutes (30m), hours (6h), days (2d), or year (5y). For the report or status refer files present in /var/lib/puppet/state directory. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Monday, September 16, 2013 4:27:54 PM UTC+5:30, Adeel Bhatti wrote: Hi, Is it nesseccary to access the client machine and execute the agent command manually to take in configuration ? or if the agent can know itsself that the server has some changes for it !! secondly, can't we have agent's logs/status of taking in changes/configurations ? I am using open source puppet master ! Adeel -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet Resources Ordering
Hi Chengkai, I have faced similar kind of problem for class ordering using ordering arrow (*-)*. You can try the stage resources for ordering classes. Refer following code snippet, #Declare stage resources stage {'first':} stage {'second':} stage {'third':} #Define ordering of stages Stage[first] - Stage[second] - Stage[third] #use stages in each classes. class {'A': stage = first, } class {'B': stage = second, } class {'C': stage = third, } Refer http://docs.puppetlabs.com/puppet/2.7/reference/lang_run_stages.html for stage resource for classes. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Sunday, September 15, 2013 10:44:17 AM UTC+5:30, chengkai liang wrote: Hi All, I have the following classes define: init.pp class { 'A': } - class { 'B': } - class { 'C': } Supposedly, the execution order should A then B then C, but the actual execution order seems that C is being executed before B. Why is this happening? Isn't - will chain up the resources order? Anybody has any idea? Thanks, Chengkai -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Failed to apply catalog: Netowork is unreachable - connect(2)
Hi Anup, Try disabling the firewall/ iptables of both the machine puppetserver and puppet client. If you want firewall to be running then add rules for ports *8140, 61613, and 443 *in iptalbes. Commands to add rule in iptables, # iptables -I INPUT -p tcp --dport portnumber -j ACCEPT # service iptables save # service iptables restart Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Saturday, September 14, 2013 3:16:55 AM UTC+5:30, Anup Singh wrote: I tried my best to follow the instruction given at the following page however the result is ZERO for the last two months. I am spending much of my time hitting the wrong corner and it looks like no one know the right answer to the puppet problems. Installing and configuring puppet is a tough jobs Ok enough of my story. tried to follow the instructions given in puppet prove of concept but failed: http://docs.puppetlabs.com/pe/latest/quick_start.html PuppetMaster My Error Error: Failed to apply catalog: Netowork is unreachable - connect(2) Error: Could not send report: Network is unrechable - connect (2) logged in as roop Test telnet localhost 8041 (61613 and 443) connected telnet learn.localdomain 8041 (61613 and 443) network is unreachable puppet agent -t Failed to apply catalog: Network is Unreachable Could not send report: Network is Unreachable Hosts file puppet agent and host have same information in /etc/hosts 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.0.105 lear.localdomain learn puppet.localdomain puppet Certs cd.pem learnlocaldomain.pem pe-internal-mcillective-servers.pem pe-internal-broker.pem pe-internal-puppet-console-mcillecitve-client.pem -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: hostname appears in classes.txt
Hello Mark, can you post what is the problem you faced and how you solved, this will be helpful for community... :) Thanks and regards, Rahul Khengare NTT DATA OSS Center, pune, India. On 9/14/13, mark bradley gopearl...@gmail.com wrote: Hello Rahul, I've found the problem -- error on my part :( Thanks for the suggestions anyway .. Mark On Fri, Sep 13, 2013 at 9:31 AM, mark bradley gopearl...@gmail.com wrote: Hi Rahul, Thanks for the reply! First of all, the problem is that the class that the node belongs to isn't being realized (that is, files that are installed on other nodes of that class aren't being installed on this problematic node). Also, I cannot find the --loadclasses option in http://docs.puppetlabs.com/man/agent.html and the binary also complains .. can you expand on this? Thanks, Mark On Fri, Sep 13, 2013 at 9:11 AM, Rahul Khengare rahulk1...@gmail.comwrote: Hi Mark, The classes.txt file contains all the classes which is to be executed on agent. It also contains hostname. So the hostname in classes.txt file is not a problem. Check out the classes present in your manifests which is to be apply on agent are present in classes.txt. If not present then you can run puppet agent as, # puppet agent --test --loadclasses Can you explain your problem in details like which file is not pick by puppet. Also give your manifests code. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Friday, September 13, 2013 6:02:26 AM UTC+5:30, Mark wrote: Although I have a node defined (puppet agent --test runs without error) the agent does not pick up files that it should be accessing and I've noticed that the hostname appears in classes.txt. Does anyone have a notion of what's happening? Could it be that my node isn't being recognized as belonging to the class defined on the server? Mark -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/2DbzVFVWAG8/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: classes.txt missing
Hi Nitesh, I think the vardir variable is missing in your puppet.conf file. In Puppet.conf you have to specify the *vardir* variable path and after running the puppet manifests you can check the classes.txt file in /var/lib/puppet/ directory. vardir = /var/lib/puppet/ Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Wednesday, March 9, 2011 4:49:55 AM UTC+5:30, Nitesh wrote: Hi It seems like classes.txt file is not being created when I run puppet on my servers. I am running puppet without a puppet master. I use subversion to pull the manifests on each of the boxes and run this command to run puppet. puppet apply --verbose /path/to/manifest My puppet version is puppet 2.6.4. My puppet.conf file looks like this: [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 # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = $vardir/ssl # Where manifests are kept manifestdir = $vardir/manifests [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 Any idea why that may be happening? Thanks. -- Nite -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: hostname appears in classes.txt
Hi Mark, The classes.txt file contains all the classes which is to be executed on agent. It also contains hostname. So the hostname in classes.txt file is not a problem. Check out the classes present in your manifests which is to be apply on agent are present in classes.txt. If not present then you can run puppet agent as, # puppet agent --test --loadclasses Can you explain your problem in details like which file is not pick by puppet. Also give your manifests code. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Friday, September 13, 2013 6:02:26 AM UTC+5:30, Mark wrote: Although I have a node defined (puppet agent --test runs without error) the agent does not pick up files that it should be accessing and I've noticed that the hostname appears in classes.txt. Does anyone have a notion of what's happening? Could it be that my node isn't being recognized as belonging to the class defined on the server? Mark -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet and RH chkconfig
Hi Forrie, Puppet service resource *enable* property internally executes the chkconfig command for red hat, This property behaves quite differently depending on the platform; wherever possible, it relies on local tools to enable or disable a given service.You can confirm the facter *osfamily *returns *redhat *or not. Use provider = redhat along with enable property. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thursday, September 12, 2013 3:54:51 AM UTC+5:30, Forrie wrote: I've been trying to follow several threads around Google about Puppet and it's use (or non-use) of chkconfig on RH Linux. What prompted me to do this is I noticed that Puppet is, correctly, repeatedly logging that it is changing a services from ON to OFF. Funny, I thought I had disabled that with: service { ip6tables: enable = false, ensure = stopped, } Which certainly works, but it doesn't disable the service (ie: chkconfig servicename off) -- it seems like there should be a provider that correctly integrates with the system chkconfig -- I realize that not all init scripts honor that, and for that folks can do whatever. This is a basic functionality of RH Linux that enables, adds, deletes and otherwise alters the levels of basic services. Seems reasonable that Puppet could properly interact with it? We are up to Puppet 3.4.x now. I'm simply asking here as I didn't seem to find a definitive answer - a lot of code snippets and suggestions, I just wonder if this is on-tap for improvement or if someone has another, perhaps clever approach to working with this? Thanks! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Is it possible to install actual OS using puppet?
Hi Rastio, I dont think that puppet do operating system installation. Puppet is configuration management tool, you can use puppet to configure any software and operating system settings after puppet get install on your machine. For automatic installation of operating system there is tools called*kickstart, cobler *, etc. Refer following blog link about puppet and operating system installation relation, http://puppetlabs.com/blog/your-os-installer-and-you* * * * Thanks and* *regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thursday, September 12, 2013 1:08:02 AM UTC+5:30, Rastio Hodul wrote: Hi, ideally I would like to crate bootable USB stick with, say, Ubuntu + Puppet on it. I would then use this USB stick on a blank computer to boot to it and install new OS (Ubuntu+WhateverIWant) on that blank computer. I know I can do WhateverIWant part, but can I install actual OS? Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid
Hi Manchana, can you check the *rundir *option in */etc/puppetlabs/puppet/puppet.conf * file as, . *rundir = /var/run/pe-puppet * Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Monday, September 9, 2013 6:53:53 PM UTC+5:30, sandeep kumar wrote: Hi All, While I am running puppet agent I get the following error: command : puppet agent --verbose Error: Could not prepare for execution: Could not create PID file: /var/run/pe-puppet/agent.pid Checked under /var/run/pe-puppet, pid file is being created when the serrvice is started. Checked in the puppet.conf and the rundir is correctly mentioned. Nothing found under /var/log/pe-puppet/ Please let me know where else I can check for the error. Thanks, Manchana -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet under HA Environment
You can use different *runinterval *for each client. This can be done using editing of /etc/puppet/puppet.conf on each client machine. Set the following (add a new line if it's not already present) in the [agent] section of the file: runinterval=XXX where, XXX is the time in seconds(default is 180), Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote: How do I avoid a situation where all of my Linux servers execute a service restart at the same time upon receiving a new configuration change via Puppet? I am trying to avoid any possibility that the service would be unavailable for any length of time. The servers are behind a load balancer. At least one node needs to remain available. Any idea how I might configure Puppet to work in this HA environment? Thank you for your feedback! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Incorrect return code for failed exec
Hi Igor, You can run sc start MyService command manually on your machine and check whether the service run correctly. Also check the environment parameters are set for that service. Can you explain your query in more detail manner. Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Saturday, August 31, 2013 3:20:54 AM UTC+5:30, Igor Berger wrote: Hello, I'm running puppet agent standalone on Windows. The last step in the manifest is exec { 'start_service': command = sc start MyService }. When the service has a problem and doesn't start, Puppet logs: /Stage[main]//Exec[start_service]/returns (err): change from notrun to 0 failed: sc start MyService returned 29 instead of one of [0] However, the %errorlevel% returned is still 0. However, if I use --detailed-exitcodes, the %errorlevel% is correctly set to 6. Regards, Igor. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: [pe-users] trouble installing open source puppet client
Hi Stuart, I think you have to downgrade your rubygems version- 2.0.6 and try to install puppet this might work. Refer Following link for supported version of ruby, http://docs.puppetlabs.com/guides/platforms.html#ruby-versions Thanks and Regards, Rahul Khengare, NTT DATA OSS-Center, Pune, India. On Friday, August 16, 2013 6:05:24 AM UTC+5:30, Stuart Cracraft wrote: Redirected - need help. Please review and give me your collective thoughts. Encountering headwinds when trying to install Open Source Puppet *client*. The Puppet master and its client work fine and I don't see a lot of differences to dig into. If you need more information than what I give in the logs and comments below, please let me know. Begin forwarded message: *From: *Stuart Cracraft smcra...@me.com javascript: *Date: *August 15, 2013 5:27:58 PM *To: *pe-u...@puppetlabs.com javascript: pe-u...@puppetlabs.comjavascript: *Subject: **[pe-users] trouble installing open source puppet client* Trouble installing the client with yum install puppet Getting an error with a dependency by rubygem-json on rubygems. Forbidden when trying to do a general rubygems update. gem list shows rake (10.1.0) and rubygems-update (2.0.6) as installed but gem update --system gives the above forbidden error. Proxy is open for this box for: *.puppetlabs.com gems.rubyforge.org *.rubygems.org have tried http_proxy and HTTP_PROXY set to both the proxy's ip with 8080 some-ip:8080 and as http://some-ip:8080 curl -x proxyserverip:8080 http://puppetlabs.com and curl -x proxyserverip:8080 Stuart Log: [root@ca-sna-bb01 rubygems-2.0.6]# yum install puppet Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. This system is receiving updates from RHN Classic or RHN Satellite. Setting up Install Process Resolving Dependencies -- Running transaction check --- Package puppet.noarch 0:3.2.4-1.el6 will be installed -- Processing Dependency: facter = 1.6.11 for package: puppet-3.2.4-1.el6.noarch -- Processing Dependency: hiera = 1.0.0 for package: puppet-3.2.4-1.el6.noarch -- Processing Dependency: ruby(selinux) for package: puppet-3.2.4-1.el6.noarch -- Running transaction check --- Package facter.i386 1:1.7.2-1.el6 will be installed --- Package hiera.noarch 0:1.2.1-1.el6 will be installed -- Processing Dependency: rubygem-json for package: hiera-1.2.1-1.el6.noarch --- Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed -- Running transaction check --- Package rubygem-json.x86_64 0:1.5.5-1.el6 will be installed -- Processing Dependency: rubygems for package: rubygem-json-1.5.5-1.el6.x86_64 -- Finished Dependency Resolution Error: Package: rubygem-json-1.5.5-1.el6.x86_64 (puppetlabs-deps) Requires: rubygems You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest [root@ca-sna-bb01 rubygems-2.0.6]# gem update --system ERROR: While executing gem ... (Net::HTTPServerException) 403 Forbidden [root@ca-sna-bb01 rubygems-2.0.6]# echo $http_proxy http://some-ip-here(1.2.3.4,etc.):8080 [root@ca-sna-bb01 rubygems-2.0.6]# echo $HTTP_PROXY [root@ca-sna-bb01 rubygems-2.0.6]# ruby setup.rb RubyGems 2.0.6 installed Installing ri documentation for rubygems-2.0.6 /usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block /usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block : : : -- RubyGems installed the following executables: /usr/bin/gem Ruby Interactive (ri) documentation was installed. ri is kind of like man pages for ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you do not wish to install this documentation in the future, use the --no-document flag, or set it as the default in your ~/.gemrc file. See 'gem help env' for details. [root@ca-sna-bb01 rubygems-2.0.6]# -- You received this message because you are subscribed to the Google Groups Puppet Enterprise Users group. To unsubscribe from this group and stop receiving emails from it, send an email to pe-users+u...@puppetlabs.com javascript:. Visit this group at http://groups.google.com/a/puppetlabs.com/group/pe-users/. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com
Re: [Puppet Users] Re: Despite no change in content, agent log file indicates content changed in each catalog run
Ed, It sound correct. The tag/facter value @uptime_seconds changes each time you run the puppet on agent machine. During the puppet catalog run, puppet first fetch the facter value and then apply the puppet manifests. So whatever the value of facter are set before the puppet manifests deployment. You can view facter values using 'facter -p'. You may look for tag concept it might help. http://projects.puppetlabs.com/projects/1/wiki/Using_Tags Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Thu, Aug 22, 2013 at 9:09 PM, Ed Young e...@summitbid.com wrote: Thanks for the response. There doesn't seem to be another process updating the files on before the puppet run. I believe the issue was the presence of a dynamic tag on the template file. The problem appears to be that the tag %= @uptime_seconds % was in some of the configuration files. When I removed that tag from the apache config files, and from the tomcat6 config files, there were no longer any updates due to file changes. The %= @uptime_seconds % appears to be set before execution of the puppet run, which I didn't expect, since tags such as %= @fqdn % resolve on the target agent node. Does this sound correct? if so, how do I know which tags or variables will be set before the puppet execution, and which are set on the agent side after the catalog run? On Wednesday, August 21, 2013 7:14:21 AM UTC-6, Rahul Khengare wrote: Hi Ed, Puppet execute their file resource only if contents of target file get changed at the before execution of puppet run. I checked your problem on RHEL-6.2 using puppet version 2.7.12, httpd.conf file not transferred each time if there is not change in the contents. You may have to check the contents of httpd.conf file before and running the puppet(use vimdiff command). There may possibility that httpd.conf file is edited by another service, Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Tuesday, August 20, 2013 6:33:03 AM UTC+5:30, Ed Young wrote: Despite no change in file (actually, template) content, with each catalog run I get such log output as: Aug 19 20:49:50 app-dev puppet-agent[30132]: (/Stage[main]/Apache-httpd/ **File[/etc/httpd/conf/httpd.**conf]/content) content changed '{md5}** b8a5c22154e45771bc09ef5c34 [root@chimps-dev puppet]# service puppet restart │603e7f' to '{md5}** 14699f9c769a61cbc6cc5e2c2a7465**ff' Which indicates that the file changed on the puppet master and so will be updated on the agent. This happens consistently and results in a service restart when the files are config files like httpd.conf. this is with puppet 2.6.18 on RHEL 6 (puppet master) and RHEL 5 (puppet agent) Here is my init.pp in my apache module. Note that I'm using templates only (nothing in my files directory) class apache-httpd { $moduleName = apache-httpd file { '/etc/httpd/conf/httpd.conf': owner = root, group = root, mode = 0644, ensure = 'file', # source = 'puppet:///modules/apache-** httpd/etc/httpd/conf/httpd.**conf', content = template('apache-httpd/etc/** httpd/conf/httpd.conf.erb'), } file { '/etc/httpd/conf.d/proxy_ajp.**conf': owner = root, group = root, mode = 0644, ensure = 'file', # source = 'puppet:///modules/apache-** httpd/etc/httpd/conf.d/proxy_**ajp.conf', content = template('apache-httpd/etc/** httpd/conf.d/proxy_ajp.conf.**erb'), } file { '/etc/httpd/conf.d/ssl.conf': owner = root, group = root, mode = 0644, ensure = 'file', ## source = 'puppet:///modules/apache-** httpd/etc/httpd/conf.d/ssl.**conf', content = template('apache-httpd/etc/** httpd/conf.d/ssl.conf.erb'), } } -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/Gly9jw9K3m8/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Installation problem (PE 3.0.0 on RHEL 6.4 x64)
Hi Jan, This is the problem of postgresql database server. Check postgreSQL server on your machine working or not. First start the postgresql server and then try to run puppet enterprise installation. Thanks and Regards, Rahul Khengare NTT DATA OSS Center Pune, India.** On Tuesday, August 20, 2013 6:42:30 PM UTC+5:30, Jan Walczuk wrote: Hello everyone. I'm trying to install Puppet Enterprise for test purposes before my company make a purchase of Puppet Enterprise. There is a problem with installation (good start i guess :) ). After QA from installator and packages installation I'm getting this output: ## Setting up puppet master... ## Checking the agent certificate name detection... ## Setting up puppet agent... ## Setting up the database... Configuring postgresql server... PostgreSQL server configured. !! ERROR: The PostgreSQL server failed to start; unable to proceed My conclusion after browsing install_log: If you guys could be so nice and put info about remounting /var with exec that would be nice. :) Best regards. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Despite no change in content, agent log file indicates content changed in each catalog run
Hi Ed, Puppet execute their file resource only if contents of target file get changed at the before execution of puppet run. I checked your problem on RHEL-6.2 using puppet version 2.7.12, httpd.conf file not transferred each time if there is not change in the contents. You may have to check the contents of httpd.conf file before and running the puppet(use vimdiff command). There may possibility that httpd.conf file is edited by another service, Thanks and Regards, Rahul Khengare, NTT DATA OSS Center, Pune, India. On Tuesday, August 20, 2013 6:33:03 AM UTC+5:30, Ed Young wrote: Despite no change in file (actually, template) content, with each catalog run I get such log output as: Aug 19 20:49:50 app-dev puppet-agent[30132]: (/Stage[main]/Apache-httpd/File[/etc/httpd/conf/httpd.conf]/content) content changed '{md5}b8a5c22154e45771bc09ef5c34 [root@chimps-dev puppet]# service puppet restart │603e7f' to '{md5}14699f9c769a61cbc6cc5e2c2a7465ff' Which indicates that the file changed on the puppet master and so will be updated on the agent. This happens consistently and results in a service restart when the files are config files like httpd.conf. this is with puppet 2.6.18 on RHEL 6 (puppet master) and RHEL 5 (puppet agent) Here is my init.pp in my apache module. Note that I'm using templates only (nothing in my files directory) class apache-httpd { $moduleName = apache-httpd file { '/etc/httpd/conf/httpd.conf': owner = root, group = root, mode = 0644, ensure = 'file', # source = 'puppet:///modules/apache-httpd/etc/httpd/conf/httpd.conf', content = template('apache-httpd/etc/httpd/conf/httpd.conf.erb'), } file { '/etc/httpd/conf.d/proxy_ajp.conf': owner = root, group = root, mode = 0644, ensure = 'file', # source = 'puppet:///modules/apache-httpd/etc/httpd/conf.d/proxy_ajp.conf', content = template('apache-httpd/etc/httpd/conf.d/proxy_ajp.conf.erb'), } file { '/etc/httpd/conf.d/ssl.conf': owner = root, group = root, mode = 0644, ensure = 'file', ## source = 'puppet:///modules/apache-httpd/etc/httpd/conf.d/ssl.conf', content = template('apache-httpd/etc/httpd/conf.d/ssl.conf.erb'), } } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Copying multiple files to multiple locations
Hi Matthijs, You can try using array variable in file resource.This may solve your issue. Can you explain in detail. I mean the location of files and directory structures. If you want to copy the same file content in several files refer following code snippet,You can use various files path in array. $file_names = ['/root/t1',/root/t2',/root/t3',/root/t4'] file { $file_names: ensure = file, content = 'xyz', } You can also use source = '/root/xyz.txt' tag/attribute of file resource for coping whole file. This copied the 'xyz' content in all the files present in $file_name array variables. Thanks Regards, Rahul Khengare, NTT DATA OSS Center Pune, India.** On Friday, August 9, 2013 7:36:42 PM UTC+5:30, Matthijs Suringa wrote: Hi, I'm, still relatively new to Puppet, so there might be something I am overlooking. Anyway, my situation is that I can install 1 or multiple tomcat instances on a machine, and in order for me to ensure that they can talk to all databases we run (test environments) I want to copy all DB drivers into each instance. So basically I have a defined type for my tomcat instance, which does the installation of the tomcat binaries and configured the necessary files. Per instance I need to copy X files into the lib directory. I wanted to do this with another defined type, so I could loop through an array of DB-drivers. However, because both instances would require the same files, I am running into the duplicate declaration error. Is there any way to resolve this issue? Thanks -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: facter string value comparison to integer
hi hyde, You don't need to convert facter string into integer before comparing to integer value, puppet internally take care of it. I just checked it on open source puppet version - 2.7.12 and puppet enterprise version - 2.7. On Monday, August 5, 2013 8:38:09 PM UTC+5:30, hyde wrote: It seems this statement is working for latest puppet+facter: if($::processorcount25). Before there was concern that puppet would not auto convert string to number, is this still a concern here? I am wondering if I should convert the facter string value to integer first before comparing it .. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Wildcards in file resourses -- yet another time
Hi Ivan, You can try putting the all file names in array variable and use that array variable in file resource. File resource of puppet support array structure. This might work. On Friday, August 2, 2013 2:09:32 PM UTC+5:30, Ivan Lysov wrote: Hi All! I want to grant spetial permissions on some core files. So it would be nice to use something like file { /var/lib/monitorium/core* : mode = 0644, } But that obviously doesn't work. Any people with the same problem i've googled used some workarounds like managing directories recursively or writing more complicated scripts. I can't manage the whole directory because of many other files inside and i don't want to extrabloat my manifests. What should i do? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Verify variable value and set to default param if out of range?
Hi Stephen, As per my understanding of your query, you want version parameter value 5.5 as default and on passing parameter value its become 5.3. But in your case its take version = 5.5. Correct me if i am wrong. Solution for your query is u have to construct parameterized class maria and it has to be inheriated by maria::params. # maria class class maria ( $version = maria::params::version ) inherits maria::params { notify { $version :} } # params class class maria::params { $version = '5.5' } # when we call the class maria with version parameter it set the $version value to passed value (here 5.3) class {maria: $version = '5.3' } # when we call the class maria without version parameter it set the $version value to default value from params class (here 5.5) class {maria: } I hope this will solve your problem. If i interpreted your query correctly. Thanks and Regards, Rahul Khengare. NTT DATA GTS (OSS centre) pune On Tuesday, July 30, 2013 12:08:17 AM UTC+5:30, Stephen Brown II wrote: Greetings all, I have a feeling I'm trying to be a bit too clever for my own good, or making the mistake of treating the declarative language as a procedural. But at any rate, here is my issue. I would like to set up a params class ( in the style of http://docs.puppetlabs.com/guides/parameterized_classeshttp://docs.puppetlabs.com/guides/parameterized_classes.html#appendix-smart-parameter-defaults ) for installing mariadb on any operating system that is supported by the official mariadb.org repository configuratior: https://downloads.mariadb.org/mariadb/repositories/ However, I've noticed that not all versions of MariaDB are available for all OS releases. For the most part, 5.5 and 10.0 are available, but for older versions of Ubuntu /(hardy|maverick|natty|oneiric)/, only 5.2 and 5.3 are available. Here is the gist of my params.pp as it stands: https://gist.github.com/StephenBrown2/6106113 What I would eventually like to get working is the ability for the module to set a reasonable default, and also allow for overriding in the calling, but if the operating system doesn't support that MariaDB release version, to use the latest available release instead. For example, this should work fine: class { 'maria': } This should also work: class { 'maria': version = '5.5', } both resulting in mariadb 5.5 being installed on anything but those older ubuntu's. in which case, Puppet would throw a warning and set $version instead to '5.3'. Similarly, if this was specified: class { 'maria': version = '5.3', } on a Debian 7 system, I'd expect it to come back as '10.0'. But this might be where the cleverness could be a liability. Might I have to simply set the default version for each possible operatingsystem value? I would hope not, as that seems a bit unweildy, but maybe necessary since variables can only be declared once per scope ( http://docs.puppetlabs.com/learning/variableshttp://docs.puppetlabs.com/learning/variables.html#variables : You can only assign the same variable *once* in a given scope. ) Please let me know if I've been unclear, or enlighten me if this is going down the wrong path. Thanks! Stephen B -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Unable to start heartbeat service
HI, There is no issue of puppet on editing /etc/sysconfig/network file. Cause of problem : Here, I edit template of /etc/sysconfig/network file in windows machine so the line-feed character is of windows, on transferring that template file on linux environment cause problem with network configuration file because of mismatch of line-feed character. Note : Avoid writing of template files for linux configuration on windows machine and then copying on linux machine. On 5/8/13, Rahul Khengare rahulk1...@gmail.com wrote: Hi, I have two machine named puppetserver and db01 with CentOS-6.2(64-bit). On db01: I am configuring pacemaker and heartbeat using puppet manifests present on puppetserver. I am also automating the network settings using puppet, here i am adding the GATEWAY in */etc/sysconfig/network* file using puppet manifests. After deploying the respective manifests pacemaker and heartbeat working fine. *But, after rebooting the machine, heartbeat service is unable to start (on db01).* *Discription of error log:* May 08 11:52:27 db01 heartbeat: [3423]: info: respawn directive: root /usr/lib64/heartbeat/ifcheckd May 08 11:52:27 db01 heartbeat: [3423]: info: AUTH: i=1: key = 0x15b89b0, auth=0x7f5c36e15db0, authname=sha1 May 08 11:52:27 db01 heartbeat: [3423]: ERROR: Current node [db01] not in configuration! May 08 11:52:27 db01 heartbeat: [3423]: info: By default, cluster nodes are named by `uname -n` and must be declared with a 'node' directive in the ha.cf file. May 08 11:52:27 db01 heartbeat: [3423]: info: See also: http://linux-ha.org/wiki/Ha.cf#node_directive May 08 11:52:27 db01 heartbeat: [3423]: WARN: Logging daemon is disabled --enabling logging daemon is recommended May 08 11:52:27 db01 heartbeat: [3423]: ERROR: Configuration error, heartbeat not started. If i add the GATEWAY parameter in the /etc/sysconfig/network file * manually* then it works fine even after rebooting. *Queries:* *--* 1. If i change the '/etc/sysconfig/network' file using puppet manifests the heartbeat service not start. Is there any problem if i change */etc/sysconfig/network* file using puppet manifests. 2. Somebody faced similar or any other problem on editing or transferring '* /etc/sysconfig/network*' file using puppet manifests. Any pointers or help!!! Thanks and Regards, Rahul Khengare -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/AEp7IuPthLQ/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Unable to start heartbeat service
Hi, I have two machine named puppetserver and db01 with CentOS-6.2(64-bit). On db01: I am configuring pacemaker and heartbeat using puppet manifests present on puppetserver. I am also automating the network settings using puppet, here i am adding the GATEWAY in */etc/sysconfig/network* file using puppet manifests. After deploying the respective manifests pacemaker and heartbeat working fine. *But, after rebooting the machine, heartbeat service is unable to start (on db01).* *Discription of error log:* May 08 11:52:27 db01 heartbeat: [3423]: info: respawn directive: root /usr/lib64/heartbeat/ifcheckd May 08 11:52:27 db01 heartbeat: [3423]: info: AUTH: i=1: key = 0x15b89b0, auth=0x7f5c36e15db0, authname=sha1 May 08 11:52:27 db01 heartbeat: [3423]: ERROR: Current node [db01] not in configuration! May 08 11:52:27 db01 heartbeat: [3423]: info: By default, cluster nodes are named by `uname -n` and must be declared with a 'node' directive in the ha.cf file. May 08 11:52:27 db01 heartbeat: [3423]: info: See also: http://linux-ha.org/wiki/Ha.cf#node_directive May 08 11:52:27 db01 heartbeat: [3423]: WARN: Logging daemon is disabled --enabling logging daemon is recommended May 08 11:52:27 db01 heartbeat: [3423]: ERROR: Configuration error, heartbeat not started. If i add the GATEWAY parameter in the /etc/sysconfig/network file * manually* then it works fine even after rebooting. *Queries:* *--* 1. If i change the '/etc/sysconfig/network' file using puppet manifests the heartbeat service not start. Is there any problem if i change */etc/sysconfig/network* file using puppet manifests. 2. Somebody faced similar or any other problem on editing or transferring '* /etc/sysconfig/network*' file using puppet manifests. Any pointers or help!!! Thanks and Regards, Rahul Khengare -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)
thanks for reply, first let me again describe my problem in detail. I have two database server db01 and db02, on the database server (db01) i have to install and configure postgresql and pg_statinfo module and on database server(db02) i have to install and configure only postgresql. I created postgresql module to install and configure postgresql and pg_statsinfo module for pg_statsinfo. Here, postgresql.conf file contains the configuration for both postgresql and pg_statsinfo.(This is the common file which is to be edited, i use template to make changes), for the pg_statsinfo module i have to add the addition contents to file plus change some in between contents. I am not able to change postgresql.conf file twice in postgresql module and then pg_statsinfo module in case of db01, it give duplication declaration of file resources. If i change the contents of postgresql.conf file in postgresql module then in case of db02 the postgresql not working because some addition parameters of pg_statsinfo in postgresql.conf. i hope this help you to understand the scenario, how i maintain the modularity between to modules and change the same file twice for correct working. Thanks in advance. Rahul On Friday, April 12, 2013 6:45:37 PM UTC+5:30, jcbollinger wrote: On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote: Hi all, I am writing two modules abc and xyz. In both the modules i have to change common test.txt file,here i use template (.erb) file to changing the contents. In both abc and xyz the contents of test.txt file is different, if i declare file resource for test.txt file in two different modules it gives duplicate declaration of resource error. For the correct working of modules abc and xyz, i have to change the test.txt file twice. How i overcome this situation ? You need to frame the problem correctly. A File resource represents a whole, specific file. What is it even supposed to mean if you specify the same target file's content differently in different places? Your two declarations cannot both be satisfied. This sort of internal inconsistency is one of the reasons for Puppet's prohibition against multiple declarations of the same resource (though that prohibition applies even when two or more declarations all specify exactly the same parameters). There are at least two different things you could reasonably mean: 1. Most likely, you mean that you want to separately describe two or more different parts of the same file. In that case you are incorrect to model the parts as File resources, because they are not whole files. There are multiple ways to handle this, but a good one would be via the Concat module, which you can find on the module forge. It will allow you to model individual pieces of a file, and to specify how they are to be assembled to form the whole. 2. You could mean that you want to declare separate files whose contents are based on the same template. In that case it is correct to use separate File resources, but you must be declaring them wrongly. Each one must have a unique title and a unique absolute filename (path property); if not specified explicitly, the absolute filename is the same as the title. There is no inherent need for the resource title or target file name to have any particular relationship with the template file name (though you will make it easier on yourself if you choose something that helps you associate them). Good luck, John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Duplicate Declaration of resource (editing contents of same file in two diiferent module)
Hi all, I am writing two modules abc and xyz. In both the modules i have to change common test.txt file,here i use template (.erb) file to changing the contents. In both abc and xyz the contents of test.txt file is different, if i declare file resource for test.txt file in two different modules it gives duplicate declaration of resource error. For the correct working of modules abc and xyz, i have to change the test.txt file twice. How i overcome this situation ? I am new to community, so i am not very familiar to format of query posting,sorry about that. Thanks in advance for answers. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.