Re: [Puppet Users] New Puppet Setup
Hello Den, I just used below puppetlabs repo and i was able to install puppet server along with the dependency. rpm -ivh http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-1.noarch.rpm Thanks for quick help Thanks, Munna On Mon, Jun 25, 2012 at 1:08 PM, Denmat wrote: > Hi Munna, > > You can find those packages in the EPEL repository. > > See http://fedoraproject.org/wiki/EPEL. > > Den > > On 25/06/2012, at 17:34, Munna S <19.mu...@gmail.com> wrote: > > Team, > > I am trying to setup new Puppet master server on Centos 5.4. I am getting > the below error which running yum install puppet-server > > puppet-2.7.17-1.el5.noarch from puppetlabs has depsolving problems > --> Missing Dependency: ruby-shadow is needed by package > puppet-2.7.17-1.el5.noarch (puppetlabs) > puppet-2.7.17-1.el5.noarch from puppetlabs has depsolving problems > --> Missing Dependency: ruby-augeas is needed by package > puppet-2.7.17-1.el5.noarch (puppetlabs) > Error: Missing Dependency: ruby-augeas is needed by package > puppet-2.7.17-1.el5.noarch (puppetlabs) > Error: Missing Dependency: ruby-shadow is needed by package > puppet-2.7.17-1.el5.noarch (puppetlabs) > You could try using --skip-broken to work around the problem > You could try running: package-cleanup --problems > package-cleanup --dupes > rpm -Va --nofiles --nodigest > > I am using the below puppet respository > > [puppetlabs] > name=Puppet Labs Packages > baseurl=http://yum.puppetlabs.com/el/$releasever/products/$basearch/ > enabled=1 > gpgcheck=1 > gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs > > Also my Current ruby version is as below > > ruby 1.8.5 (2006-08-25) [i386-linux] > > > Thanks, > Munna > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] New Puppet Setup
Team, I am trying to setup new Puppet master server on Centos 5.4. I am getting the below error which running yum install puppet-server puppet-2.7.17-1.el5.noarch from puppetlabs has depsolving problems --> Missing Dependency: ruby-shadow is needed by package puppet-2.7.17-1.el5.noarch (puppetlabs) puppet-2.7.17-1.el5.noarch from puppetlabs has depsolving problems --> Missing Dependency: ruby-augeas is needed by package puppet-2.7.17-1.el5.noarch (puppetlabs) Error: Missing Dependency: ruby-augeas is needed by package puppet-2.7.17-1.el5.noarch (puppetlabs) Error: Missing Dependency: ruby-shadow is needed by package puppet-2.7.17-1.el5.noarch (puppetlabs) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest I am using the below puppet respository [puppetlabs] name=Puppet Labs Packages baseurl=http://yum.puppetlabs.com/el/$releasever/products/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs Also my Current ruby version is as below ruby 1.8.5 (2006-08-25) [i386-linux] Thanks, Munna -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: how to exclude modules from inherited list
Team, can someone help me Thanks, Jeeva On Mon, May 7, 2012 at 10:39 AM, Munna S <19.mu...@gmail.com> wrote: > Hi Team, > > sorry for the delay. My setup is like this. > > we have a 2 .pp file. one for production ( prod_base.pp) and other for > development ( dev_base.pp) under /etc/puppet/manifests/nodes . we have > included the respective module in these 2 .pp files. for eg: > > prod_base.pp has the below content > --- > node prod_base { > # Prod Module > include prod_scripts > include prod_disabled_services > include prod_apache > } > -- > now we also have a different .pp file for individual servers under > /etc/puppet/manifests/nodes by name servername.pp. for eg: > > server1.pp, server2.pp etc.. content of the server1.pp file is as below > > - > node server1 inherits prod_base { > } > - > > > now server1 inherits all the module which is mentioned in prod_base.pp. > > now my requirements is to exclude some of the modules from prod_base.pp > for server server1.pp. How i can exclude certain module from the inherited > list? > > Thanks, > Jeeva > > > > > > > On Wed, May 2, 2012 at 11:33 AM, Dan White wrote: > >> - Munna S <19.mu...@gmail.com> wrote: >> > Team, >> > >> > Any help? >> > >> > Thanks, >> > Jeeva >> > >> > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.mu...@gmail.com> wrote: >> > >> > > Team, >> > > >> > > Is there any way where we can exclude certain module from the >> inherited >> > > list >> > > >> > > Thanks, >> > > Munna >> > > >> >> http://www.catb.org/~esr/faqs/smart-questions.html >> >> Two comments: I think you are a bit impatient, and I think there is >> insufficient detail/info to formulate an answer. >> >> “Sometimes I think the surest sign that intelligent life exists elsewhere >> in the universe is that none of it has tried to contact us.” >> Bill Waterson (Calvin & Hobbes) >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: how to exclude modules from inherited list
Hi Team, sorry for the delay. My setup is like this. we have a 2 .pp file. one for production ( prod_base.pp) and other for development ( dev_base.pp) under /etc/puppet/manifests/nodes . we have included the respective module in these 2 .pp files. for eg: prod_base.pp has the below content --- node prod_base { # Prod Module include prod_scripts include prod_disabled_services include prod_apache } -- now we also have a different .pp file for individual servers under /etc/puppet/manifests/nodes by name servername.pp. for eg: server1.pp, server2.pp etc.. content of the server1.pp file is as below - node server1 inherits prod_base { } - now server1 inherits all the module which is mentioned in prod_base.pp. now my requirements is to exclude some of the modules from prod_base.pp for server server1.pp. How i can exclude certain module from the inherited list? Thanks, Jeeva On Wed, May 2, 2012 at 11:33 AM, Dan White wrote: > ----- Munna S <19.mu...@gmail.com> wrote: > > Team, > > > > Any help? > > > > Thanks, > > Jeeva > > > > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.mu...@gmail.com> wrote: > > > > > Team, > > > > > > Is there any way where we can exclude certain module from the inherited > > > list > > > > > > Thanks, > > > Munna > > > > > http://www.catb.org/~esr/faqs/smart-questions.html > > Two comments: I think you are a bit impatient, and I think there is > insufficient detail/info to formulate an answer. > > “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: how to exclude modules from inherited list
Team, Any help? Thanks, Jeeva On Wed, May 2, 2012 at 9:24 AM, Munna S <19.mu...@gmail.com> wrote: > Team, > > Is there any way where we can exclude certain module from the inherited > list > > Thanks, > Munna > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] how to exclude modules from inherited list
Team, Is there any way where we can exclude certain module from the inherited list Thanks, Munna -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
>>> addition to this i have a jeeva_base.pp file where i include all my >>>> modules. below is the portion of its content >>>> --- >>>> node jeeva_base { >>>> include all_scripts >>>> include dev_jboss_jeeva >>>> } >>>> --- >>>> below is the content of my server1.pp file . i have created individual >>>> .pp file for each server which inherits jeeva_base node. >>>> -- >>>> node server1 inherits jeeva_base { >>>> } >>>> --- >>>> >>>> As i said above, this is my requirement. >>>> >>>> we have 3 version of jboss running in our environment in different >>>> servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and >>>> no jboss in server 4 , etc >>>> >>>> on each server, jboss config file sits under different path. >>>> eg: in server 1 it sits under /opt/jboss4/ >>>> in server 2 it sits under /opt/jboss5/ >>>> in server 3 it sits under /opt/jboss6/ >>>> in server 4 no jboss is running >>>> >>>> now i have 3 different configuration file for each version of jboss >>>> which i need to replace. eg. >>>> file1, i need to replace it to jboss4 >>>> file2 , i need to replace it to jboss5 >>>> file3 , i need to replace it to jboss6 >>>> also we need to keep in mind that it should not create a files/folder >>>> on server4 which doesnt have jboss. >>>> >>>> Now i need a module which checks the jboss path on each server and >>>> should replace the sepcific file if it finds the specific path. eg >>>> >>>> if it finds /opt/jboss4, then it should replace file1, if it finds >>>> /opt/jboss5, then replace file2 and so on. But if no jboss path is found >>>> then dont perform any thing on that server. >>>> >>>> As suggested by Gary ( initial conversation) , gary helped me to create >>>> the custom facts. but it didnt work. Not sure what went wrong. >>>> in general, my requirement is very simple. just do a check on each >>>> server for specific path. if found, then copy/replace respective file , if >>>> not found then dont perform any action on that server. >>>> I hope i didnt confuse anyone. >>>> >>>> Thanks, >>>> Jeeva >>>> >>>> >>>> >>>> On Mon, Apr 16, 2012 at 5:54 AM, Munna S <19.mu...@gmail.com> wrote: >>>> >>>>> Hi Sans >>>>> i am trying it now. will let you know the output soon. Also in my >>>>> site.pp i have the below content >>>>> >>>>> import 'nodes/*' >>>>> $puppetserver = 'puppet-server.domain.com' >>>>> >>>>> >>>>> >>>>> I do have many modules , which works as expected. >>>>> >>>>> Thanks, >>>>> Jeeva >>>>> >>>>> cat /etc/puppet/manifests/site.pp >>>>> On Mon, Apr 16, 2012 at 5:36 AM, Sans wrote: >>>>> >>>>>> It's definitely a class loading problem and I don't think Jeeva is >>>>>> using "modules" at all. >>>>>> >>>>>> Jeeva: >>>>>> Could you pls try the things I said in my previous post and see if >>>>>> that works? Cheers!! >>>>>> >>>>>> >>>>>> >>>>>> On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote: >>>>>>> >>>>>>> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote: >>>>>>> > I followed your steps. now i am getting below error >>>>>>> > >>>>>>> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find >>>>>>> class >>>>>>> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at >>>>>>> >>>>>>> ... >>>>>>> >>>>>>> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and >>>>>>> below is >>>>>>> > its content >>>>>>> &
Re: [Puppet Users] Re: Need puppet module for condition copy
erent configuration file for each version of jboss which >> i need to replace. eg. >> file1, i need to replace it to jboss4 >> file2 , i need to replace it to jboss5 >> file3 , i need to replace it to jboss6 >> also we need to keep in mind that it should not create a files/folder on >> server4 which doesnt have jboss. >> >> Now i need a module which checks the jboss path on each server and should >> replace the sepcific file if it finds the specific path. eg >> >> if it finds /opt/jboss4, then it should replace file1, if it finds >> /opt/jboss5, then replace file2 and so on. But if no jboss path is found >> then dont perform any thing on that server. >> >> As suggested by Gary ( initial conversation) , gary helped me to create >> the custom facts. but it didnt work. Not sure what went wrong. >> in general, my requirement is very simple. just do a check on each server >> for specific path. if found, then copy/replace respective file , if not >> found then dont perform any action on that server. >> I hope i didnt confuse anyone. >> >> Thanks, >> Jeeva >> >> >> >> On Mon, Apr 16, 2012 at 5:54 AM, Munna S <19.mu...@gmail.com> wrote: >> >>> Hi Sans >>> i am trying it now. will let you know the output soon. Also in my >>> site.pp i have the below content >>> >>> import 'nodes/*' >>> $puppetserver = 'puppet-server.domain.com' >>> >>> >>> >>> I do have many modules , which works as expected. >>> >>> Thanks, >>> Jeeva >>> >>> cat /etc/puppet/manifests/site.pp >>> On Mon, Apr 16, 2012 at 5:36 AM, Sans wrote: >>> >>>> It's definitely a class loading problem and I don't think Jeeva is >>>> using "modules" at all. >>>> >>>> Jeeva: >>>> Could you pls try the things I said in my previous post and see if that >>>> works? Cheers!! >>>> >>>> >>>> >>>> On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote: >>>>> >>>>> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote: >>>>> > I followed your steps. now i am getting below error >>>>> > >>>>> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find >>>>> class >>>>> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at >>>>> >>>>> ... >>>>> >>>>> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and >>>>> below is >>>>> > its content >>>>> > ---- >>>>> > node jeeva_base { >>>>> > include dev_jboss_jeeva} >>>>> > >>>>> > -- >>>>> > >>>>> > also i have a another .pp file by name vm-jeeva2 under >>>>> > /etc/puppet/manifests/nodes and below is its content. we have >>>>> seperate .pp >>>>> > file for each server name. one server is vm-jeeva2. >>>>> > -- >>>>> > node vm-jeeva2 inherits jeeva_base {} >>>>> > >>>>> > >>>>> > >>>>> > what could be the problem ? >>>>> >>>>> Where is the class dev_jboss_jeeva defined? You mentioned above an >>>>> 'init.pp', which would be usual if you were using modules, but it does >>>>> not seem like you are using modules. >>>>> >>>>> It sounds like the problem you are having is wholly outside of the >>>>> complicated machinations of what you're trying to do. It looks more >>>>> like you have a much simpler class-loading problem. >>>>> >>>>> Here are a few things to try: >>>>> * Comment out all of the stuff from dev_jboss_jeeva and replace it >>>>> with a "warning" function call, to log that everything is working >>>>> right: >>>>> class dev_jboss_jeeva { >>>>> warning("dev_jboss_jeeva has successfully loaded") >>>>> } >>>>> * Copy your class dev_jboss_jeeva { ... } right before the "node >>>>> jeeva_base" and see if you see your warning message (I suggest warning >>>>> instead of info because info
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Sans, I followed your steps, but i am getting the same error again Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: (//vm-jeeva2.aircell.prod/Puppet) Using cached catalog Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run @All, Just not to confuse anyone, currently my puppet server is working as expected. i have lot of modules created and it works. This is how my configuration is 1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is my content import 'nodes/*' $puppetserver = 'puppet-server.domain.com' 2) All my modules is under below path /etc/puppet/modules/ 3) under below path i have all my .pp files . eg /etc/puppet/manifests/nodes/server1.pp /etc/puppet/manifests/nodes/server2.pp /etc/puppet/manifests/nodes/server3.pp /etc/puppet/manifests/nodes/server4.pp addition to this i have a jeeva_base.pp file where i include all my modules. below is the portion of its content --- node jeeva_base { include all_scripts include dev_jboss_jeeva } --- below is the content of my server1.pp file . i have created individual .pp file for each server which inherits jeeva_base node. -- node server1 inherits jeeva_base { } --- As i said above, this is my requirement. we have 3 version of jboss running in our environment in different servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and no jboss in server 4 , etc on each server, jboss config file sits under different path. eg: in server 1 it sits under /opt/jboss4/ in server 2 it sits under /opt/jboss5/ in server 3 it sits under /opt/jboss6/ in server 4 no jboss is running now i have 3 different configuration file for each version of jboss which i need to replace. eg. file1, i need to replace it to jboss4 file2 , i need to replace it to jboss5 file3 , i need to replace it to jboss6 also we need to keep in mind that it should not create a files/folder on server4 which doesnt have jboss. Now i need a module which checks the jboss path on each server and should replace the sepcific file if it finds the specific path. eg if it finds /opt/jboss4, then it should replace file1, if it finds /opt/jboss5, then replace file2 and so on. But if no jboss path is found then dont perform any thing on that server. As suggested by Gary ( initial conversation) , gary helped me to create the custom facts. but it didnt work. Not sure what went wrong. in general, my requirement is very simple. just do a check on each server for specific path. if found, then copy/replace respective file , if not found then dont perform any action on that server. I hope i didnt confuse anyone. Thanks, Jeeva On Mon, Apr 16, 2012 at 5:54 AM, Munna S <19.mu...@gmail.com> wrote: > Hi Sans > i am trying it now. will let you know the output soon. Also in my site.pp > i have the below content > > import 'nodes/*' > $puppetserver = 'puppet-server.domain.com' > > > > I do have many modules , which works as expected. > > Thanks, > Jeeva > > cat /etc/puppet/manifests/site.pp > On Mon, Apr 16, 2012 at 5:36 AM, Sans wrote: > >> It's definitely a class loading problem and I don't think Jeeva is using >> "modules" at all. >> >> Jeeva: >> Could you pls try the things I said in my previous post and see if that >> works? Cheers!! >> >> >> >> On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote: >>> >>> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote: >>> > I followed your steps. now i am getting below error >>> > >>> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find >>> class >>> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at >>> >>> ... >>> >>> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below >>> is >>> > its content >>> >
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Sans i am trying it now. will let you know the output soon. Also in my site.pp i have the below content import 'nodes/*' $puppetserver = 'puppet-server.domain.com' I do have many modules , which works as expected. Thanks, Jeeva cat /etc/puppet/manifests/site.pp On Mon, Apr 16, 2012 at 5:36 AM, Sans wrote: > It's definitely a class loading problem and I don't think Jeeva is using > "modules" at all. > > Jeeva: > Could you pls try the things I said in my previous post and see if that > works? Cheers!! > > > > On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote: >> >> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote: >> > I followed your steps. now i am getting below error >> > >> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class >> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at >> >> ... >> >> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below >> is >> > its content >> > --**-- >> > node jeeva_base { >> > include dev_jboss_jeeva} >> > >> > --** >> > >> > also i have a another .pp file by name vm-jeeva2 under >> > /etc/puppet/manifests/nodes and below is its content. we have seperate >> .pp >> > file for each server name. one server is vm-jeeva2. >> > -- >> > node vm-jeeva2 inherits jeeva_base {} >> > >> > >> > >> > what could be the problem ? >> >> Where is the class dev_jboss_jeeva defined? You mentioned above an >> 'init.pp', which would be usual if you were using modules, but it does >> not seem like you are using modules. >> >> It sounds like the problem you are having is wholly outside of the >> complicated machinations of what you're trying to do. It looks more >> like you have a much simpler class-loading problem. >> >> Here are a few things to try: >> * Comment out all of the stuff from dev_jboss_jeeva and replace it >> with a "warning" function call, to log that everything is working >> right: >> class dev_jboss_jeeva { >> warning("dev_jboss_jeeva has successfully loaded") >> } >> * Copy your class dev_jboss_jeeva { ... } right before the "node >> jeeva_base" and see if you see your warning message (I suggest warning >> instead of info because info sometimes requires using --verbose on the >> command line; warning will always show): >> class dev_jboss_jeeva { >> warning("dev_jboss_jeeva was here") >> } >> node jeeva_base { >> include dev_jboss_jeeva >> } >> >> If you see the message with the class defined right before the node, >> but not wherever else you have it, then you know the problem is that >> it is unable to actually find the class and you should give specifics >> about that instead. >> >> Wil > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/_Puid9FxhfAJ. > > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
I followed your steps. now i am getting below error Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: (//vm-jeeva2.aircell.prod/Puppet) Using cached catalog Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run Apr 13 17:43:44 pil-vm-pup-01 puppet-master[7899]: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below is its content node jeeva_base { include dev_jboss_jeeva } -- also i have a another .pp file by name vm-jeeva2 under /etc/puppet/manifests/nodes and below is its content. we have seperate .pp file for each server name. one server is vm-jeeva2. -- node vm-jeeva2 inherits jeeva_base { } what could be the problem ? On Thu, Apr 12, 2012 at 2:47 PM, Sans wrote: > You probably getting: "file not found" or something like that? It's > because you are trying to copy a file from one machine (i.e. puppet > server) to another machine, your puppet agent, using "cp" command. > Puppet has file{} resource and "source" parameter for that. Other than > that, if not typo, I don't see any gap between the source_path and the > dest_path in your "cp" command. > > Also, I think "class d_services::jboss" is wrong in your case. You > don't have any "d_services" module, I suppose. Try this: If "jmx- > console-users.properties" is the file that your are trying to copy, > then create a directory on your Puppet-master at "etc/puppet/modules/ > dev_jboss_jeeva/files" and put the configuration file(s) in there > first. Then, use this: > > > > # /etc/puppet/modules/dev_jboss_jeeva/manifests/jboss.pp > > > class dev_jboss_jeeva::jboss { > >define opt_dir($path) { > >$j_conf = 'jmx-console-users.properties' > >exec { "chk_${path}": > path => [ '/bin', '/usr/bin' ], > command => "test -d /opt/${path}", > } > >file { "${path}_${j_conf}": >name=> "/opt/${path}/${j_conf}", >mode=> '0644', owner => 'root', group => 'root', >source => "puppet:///modules/dev_jboss_jeeva/${j_conf}", >require => Exec[ "chk_${path}" ]; >} >} > } > > > Now, suppose you are copying the file: jmx-console-users.properties to > "/opt/jboss_1", "/opt/jboss_2" and "/opt/jboss_3" on the agent (if > available), change the init.pp like this: > > > > # /etc/puppet/modules/dev_jboss_jeeva/manifests/init.pp > > class copy_jboss_conf { > >include dev_jboss_jeeva::jboss >dev_jboss_jeeva::jboss::opt_dir { > >'copy_to_1st': >path => 'jboss_1'; > >'copy_to_2nd': >path => 'jboss_2'; > >'copy_to_3rd': >path => 'jboss_3'; >} > } > ** > > > Not tested, but should work. At least it's working for me in similar > fashion. Cheers!! > > > > On Apr 12, 6:40 pm, Munna S <19.mu...@gmail.com> wrote: > > Hi Sans, > > > > This is my jboss.pp file > > > > class d_services::jboss { > > define opt_dir($path) { > > exec { "copy_${path}": > > path=> [ '/bin', '/usr/bin' ], > > command => "cp /etc/puppet/modules/dev_jboss_jeeva/opt/jboss/ > > > jboss-4.2.3.GA/server/default/conf/props/jmx-console-users.properties/opt/${path
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Sans, This is my jboss.pp file class d_services::jboss { define opt_dir($path) { exec { "copy_${path}": path=> [ '/bin', '/usr/bin' ], command => "cp /etc/puppet/modules/dev_jboss_jeeva/opt/jboss/ jboss-4.2.3.GA/server/default/conf/props/jmx-console-users.properties/opt/${path}", onlyif => "test -d /opt/${path}", } } } this is my init.pp file class dev_jboss_jeeva { include d_services::jboss d_services::jboss::opt_dir { 'jboss_1': path => '/opt/jboss/jboss-4.2.3.GA/server/default/conf/props/'; } } But i am still getting the error On Thu, Apr 12, 2012 at 12:26 PM, Munna S <19.mu...@gmail.com> wrote: > source file path it will take from my puppet master server right ? > > -Jeeva > > On Thu, Apr 12, 2012 at 11:20 AM, Sans wrote: > >> w.r.t ${file}, what I meant is you can make it "super dynamic" with >> filenames, if you had to copy different files, as opposed to "a >> single" file. This is a perfectly working example (change the values/ >> parameter as required): >> >> >> >> # /etc/puppet/modules//manifests/test.pp >> -- >> class d_services::test { >> >>define opt_dir($path) { >> >>exec { "copy_${path}": >> path=> [ '/bin', '/usr/bin' ], >> command => "cp /tmp/yum.conf.security /opt/${path}", >> onlyif => "test -d /opt/${path}", >>} >>} >> } >> >> >> # /etc/puppet/modules//manifests/init.pp >> --- >> class mod_test { >> >>include d_services::test >>d_services::test::opt_dir { >> >> 'test_1': >>path => 'test1'; >> >>'test_2': >>path => 'test2'; >> >>'test_3': >>path => 'test3'; >> >>} >> } >> --- >> >> >> It will copy "/tmp/yum.conf.security" to "/opt/test{1|2|3}", if >> available. >> Hope this helps. Cheers!! >> >> >> >> >> On Apr 12, 4:17 pm, Munna S <19.mu...@gmail.com> wrote: >> > I am bit confused about /var/staging/${file} . Let me explain again my >> > requirement. >> > >> > we have 3 version of jboss running on multiple servers. >> > >> > I need a puppet module to copy a jboss config file to different location >> > based on path condition check . Below is my requirement >> > >> > if /opt/path1 found on the server then copy file1 or 2 >> > if /opt/path2 found on the server then copy file1 or 2 >> > if /opt/path3 found on the server then copy file1 or 2 >> > >> > if none of the above path found then dont copy any file >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
source file path it will take from my puppet master server right ? -Jeeva On Thu, Apr 12, 2012 at 11:20 AM, Sans wrote: > w.r.t ${file}, what I meant is you can make it "super dynamic" with > filenames, if you had to copy different files, as opposed to "a > single" file. This is a perfectly working example (change the values/ > parameter as required): > > > > # /etc/puppet/modules//manifests/test.pp > -- > class d_services::test { > >define opt_dir($path) { > >exec { "copy_${path}": > path=> [ '/bin', '/usr/bin' ], > command => "cp /tmp/yum.conf.security /opt/${path}", > onlyif => "test -d /opt/${path}", >} >} > } > > > # /etc/puppet/modules//manifests/init.pp > --- > class mod_test { > >include d_services::test >d_services::test::opt_dir { > >'test_1': >path => 'test1'; > >'test_2': >path => 'test2'; > >'test_3': >path => 'test3'; > >} > } > --- > > > It will copy "/tmp/yum.conf.security" to "/opt/test{1|2|3}", if > available. > Hope this helps. Cheers!! > > > > > On Apr 12, 4:17 pm, Munna S <19.mu...@gmail.com> wrote: > > I am bit confused about /var/staging/${file} . Let me explain again my > > requirement. > > > > we have 3 version of jboss running on multiple servers. > > > > I need a puppet module to copy a jboss config file to different location > > based on path condition check . Below is my requirement > > > > if /opt/path1 found on the server then copy file1 or 2 > > if /opt/path2 found on the server then copy file1 or 2 > > if /opt/path3 found on the server then copy file1 or 2 > > > > if none of the above path found then dont copy any file > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
I am bit confused about /var/staging/${file} . Let me explain again my requirement. we have 3 version of jboss running on multiple servers. I need a puppet module to copy a jboss config file to different location based on path condition check . Below is my requirement if /opt/path1 found on the server then copy file1 or 2 if /opt/path2 found on the server then copy file1 or 2 if /opt/path3 found on the server then copy file1 or 2 if none of the above path found then dont copy any file On Thu, Apr 12, 2012 at 10:10 AM, Sans wrote: > You mean, doing this: > >define opt_dir($fl_name, $path) { > > instead of this? > >define opt_dir($file, $path) { > > > > On Apr 12, 4:04 pm, Brian Gallew wrote: > > You can't put a file{} resource inside an exec{} resource. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Brian, below is my updated init.pp file. but i am getting the error as Apr 12 14:49:51 pil-vm-pup-01 puppet-master[14586]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class dev_jboss_jeeva for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod Apr 12 14:49:51 pil-vm-pup-01 puppet-master[14586]: (//vm-jeeva2.aircell.prod/Puppet) Using cached catalog Apr 12 14:49:51 pil-vm-pup-01 puppet-master[14586]: (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run my init.pp file class dev_jboss_jeeva { exec { onlyif => "test -d /opt/xyz" file { "/opt/xyz/file.txt": owner => "jboss", group => "jboss", source => "puppet://$puppetserver/modules/module_name/opt/xyz/file.txt", } } } Thanks, Jeeva On Thu, Apr 12, 2012 at 9:24 AM, Brian Gallew wrote: > Another alternative is to unconditionally copy the file to a staging > director (e.g. /var/staging) and then have > > exec { > "conditional copy to path1": > onlyif => "test -d /opt/path1" > command => "rsync -a /var/staging/file.txt /opt/path1"; > "conditional copy to path2": > onlyif => "test -d /opt/path2" > command => "rsync -a /var/staging/file.txt /opt/path2"; > "conditional copy to path3": > onlyif => "test -d /opt/path3" > command => "rsync -a /var/staging/file.txt /opt/path3"; > } > > For neatness' sake, you could turn that into a define{} > > On Thu, Apr 12, 2012 at 7:18 AM, Munna S <19.mu...@gmail.com> wrote: > >> Hi Gary, >> >> I created a custom fact path_to_check.rb and placed it under >> .../module_name/lib/facter >> >> below is my init.pp file >> >> class class_name >> if $path_to_check == present{ >> file { "/opt/xyz/file.txt": >> owner => "jboss", >> group => "jboss", >> source => >> "puppet://$puppetserver/modules/module_name/opt/xyz/file.txt", >> } >> } >> } >> But i dont see files are getting pushed >> On Sun, Apr 1, 2012 at 11:08 PM, Munna S <19.mu...@gmail.com> wrote: >> >>> Thank you so much Gary. I will try this >>> >>> Thanks, >>> Jeeva >>> >>> On Sun, Apr 1, 2012 at 11:05 PM, Gary Larizza wrote: >>> >>>> Jeeva, >>>> >>>> Your custom fact would do something like: >>>> File.directory?('/path/to/check') that returns true or false depending on >>>> whether the directory existed. Your fact would return a true or false >>>> value (so if the custom fact were named 'path_to_x' you would do something >>>> like this in your init.pp >>>> >>>> if $path_to_x == 'true' { >>>> # Do something here >>>> } else { >>>> # Do something else here >>>> } >>>> >>>> Do this for every custom fact (corresponding to the paths you want to >>>> check) in your manifest, or combine them into one giant if statement like: >>>> >>>> if ($path_to_x == 'true') or ($path_to_y == 'true') { >>>> # Do something >>>> } >>>> >>>> Does this make sense? >>>> >>>> >>>> On Sun, Apr 1, 2012 at 8:48 PM, Munna S <19.mu...@gmail.com> wrote: >>>> >>>>> Hi Gary, >>>>> >>>>> How i can put this in my init.pp file. Actually i am checking for the >>>>> path. if path found then copy the file else dont create any file/folder. >>>>> So >>>>> here i need to check for 3 different path on each server. if any of the >>>>> below path exist then copy the file. >>>>> >>>>> Thanks, >>>>> Jeeva >>>>> >>>>> On Sun, Apr 1, 2012 at 10:41 PM, Gary Larizza wrote: >>>>> >>>>>> Jeeva, >>>>>> >>>>>> >>>>>> I would make a custom fact ( >>>>>> http://docs.puppetlabs.com/guides/custom_facts.html) that checks for >>>>>> the presence of these files. Your Puppet manifest would check the >>>>>> condition of this fact to ensure the file absent
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Gary, I created a custom fact path_to_check.rb and placed it under .../module_name/lib/facter below is my init.pp file class class_name if $path_to_check == present{ file { "/opt/xyz/file.txt": owner => "jboss", group => "jboss", source => "puppet://$puppetserver/modules/module_name/opt/xyz/file.txt", } } } But i dont see files are getting pushed On Sun, Apr 1, 2012 at 11:08 PM, Munna S <19.mu...@gmail.com> wrote: > Thank you so much Gary. I will try this > > Thanks, > Jeeva > > On Sun, Apr 1, 2012 at 11:05 PM, Gary Larizza wrote: > >> Jeeva, >> >> Your custom fact would do something like: >> File.directory?('/path/to/check') that returns true or false depending on >> whether the directory existed. Your fact would return a true or false >> value (so if the custom fact were named 'path_to_x' you would do something >> like this in your init.pp >> >> if $path_to_x == 'true' { >> # Do something here >> } else { >> # Do something else here >> } >> >> Do this for every custom fact (corresponding to the paths you want to >> check) in your manifest, or combine them into one giant if statement like: >> >> if ($path_to_x == 'true') or ($path_to_y == 'true') { >> # Do something >> } >> >> Does this make sense? >> >> >> On Sun, Apr 1, 2012 at 8:48 PM, Munna S <19.mu...@gmail.com> wrote: >> >>> Hi Gary, >>> >>> How i can put this in my init.pp file. Actually i am checking for the >>> path. if path found then copy the file else dont create any file/folder. So >>> here i need to check for 3 different path on each server. if any of the >>> below path exist then copy the file. >>> >>> Thanks, >>> Jeeva >>> >>> On Sun, Apr 1, 2012 at 10:41 PM, Gary Larizza wrote: >>> >>>> Jeeva, >>>> >>>> >>>> I would make a custom fact ( >>>> http://docs.puppetlabs.com/guides/custom_facts.html) that checks for >>>> the presence of these files. Your Puppet manifest would check the >>>> condition of this fact to ensure the file absent or present (i.e. if >>>> $custom_fact { file { '/path/to/file': ensure => file } } ). >>>> >>>> >>>> Does that make sense? >>>> >>>> >>>> >>>> On Sun, Apr 1, 2012 at 8:37 PM, Munna S <19.mu...@gmail.com> wrote: >>>> >>>>> Team, >>>>> >>>>> Any help >>>>> >>>>> Thanks, >>>>> Jeeva >>>>> >>>>> On Fri, Mar 30, 2012 at 12:51 PM, Munna S <19.mu...@gmail.com> wrote: >>>>> >>>>>> Team, >>>>>> >>>>>> I need a puppet module to copy a file to different location based on >>>>>> condition check . Below is my requirement >>>>>> >>>>>> if /opt/path1 found on the server then copy file1 >>>>>> if /opt/path2 found on the server then copy file1 >>>>>> if /opt/path3 found on the server then copy file1 >>>>>> >>>>>> if none of the above path found then dont copy file1 >>>>>> >>>>>> Thanks, >>>>>> Jeeva >>>>>> >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Puppet Users" group. >>>>> To post to this group, send email to puppet-users@googlegroups.com. >>>>> To unsubscribe from this group, send email to >>>>> puppet-users+unsubscr...@googlegroups.com. >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/puppet-users?hl=en. >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> Gary Larizza >>>> Professional Services Engineer >>>> Puppet Labs >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Puppet Users" group. >>>> To post to this group, send email to puppet-users@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> puppet-users+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/puppet-users?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> >> >> -- >> >> Gary Larizza >> Professional Services Engineer >> Puppet Labs >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
Thank you so much Gary. I will try this Thanks, Jeeva On Sun, Apr 1, 2012 at 11:05 PM, Gary Larizza wrote: > Jeeva, > > Your custom fact would do something like: > File.directory?('/path/to/check') that returns true or false depending on > whether the directory existed. Your fact would return a true or false > value (so if the custom fact were named 'path_to_x' you would do something > like this in your init.pp > > if $path_to_x == 'true' { > # Do something here > } else { > # Do something else here > } > > Do this for every custom fact (corresponding to the paths you want to > check) in your manifest, or combine them into one giant if statement like: > > if ($path_to_x == 'true') or ($path_to_y == 'true') { > # Do something > } > > Does this make sense? > > > On Sun, Apr 1, 2012 at 8:48 PM, Munna S <19.mu...@gmail.com> wrote: > >> Hi Gary, >> >> How i can put this in my init.pp file. Actually i am checking for the >> path. if path found then copy the file else dont create any file/folder. So >> here i need to check for 3 different path on each server. if any of the >> below path exist then copy the file. >> >> Thanks, >> Jeeva >> >> On Sun, Apr 1, 2012 at 10:41 PM, Gary Larizza wrote: >> >>> Jeeva, >>> >>> >>> I would make a custom fact ( >>> http://docs.puppetlabs.com/guides/custom_facts.html) that checks for >>> the presence of these files. Your Puppet manifest would check the >>> condition of this fact to ensure the file absent or present (i.e. if >>> $custom_fact { file { '/path/to/file': ensure => file } } ). >>> >>> >>> Does that make sense? >>> >>> >>> >>> On Sun, Apr 1, 2012 at 8:37 PM, Munna S <19.mu...@gmail.com> wrote: >>> >>>> Team, >>>> >>>> Any help >>>> >>>> Thanks, >>>> Jeeva >>>> >>>> On Fri, Mar 30, 2012 at 12:51 PM, Munna S <19.mu...@gmail.com> wrote: >>>> >>>>> Team, >>>>> >>>>> I need a puppet module to copy a file to different location based on >>>>> condition check . Below is my requirement >>>>> >>>>> if /opt/path1 found on the server then copy file1 >>>>> if /opt/path2 found on the server then copy file1 >>>>> if /opt/path3 found on the server then copy file1 >>>>> >>>>> if none of the above path found then dont copy file1 >>>>> >>>>> Thanks, >>>>> Jeeva >>>>> >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Puppet Users" group. >>>> To post to this group, send email to puppet-users@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> puppet-users+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/puppet-users?hl=en. >>>> >>> >>> >>> >>> -- >>> >>> Gary Larizza >>> Professional Services Engineer >>> Puppet Labs >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > > Gary Larizza > Professional Services Engineer > Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need puppet module for condition copy
Hi Gary, How i can put this in my init.pp file. Actually i am checking for the path. if path found then copy the file else dont create any file/folder. So here i need to check for 3 different path on each server. if any of the below path exist then copy the file. Thanks, Jeeva On Sun, Apr 1, 2012 at 10:41 PM, Gary Larizza wrote: > Jeeva, > > > I would make a custom fact ( > http://docs.puppetlabs.com/guides/custom_facts.html) that checks for the > presence of these files. Your Puppet manifest would check the condition of > this fact to ensure the file absent or present (i.e. if $custom_fact { file > { '/path/to/file': ensure => file } } ). > > > Does that make sense? > > > > On Sun, Apr 1, 2012 at 8:37 PM, Munna S <19.mu...@gmail.com> wrote: > >> Team, >> >> Any help >> >> Thanks, >> Jeeva >> >> On Fri, Mar 30, 2012 at 12:51 PM, Munna S <19.mu...@gmail.com> wrote: >> >>> Team, >>> >>> I need a puppet module to copy a file to different location based on >>> condition check . Below is my requirement >>> >>> if /opt/path1 found on the server then copy file1 >>> if /opt/path2 found on the server then copy file1 >>> if /opt/path3 found on the server then copy file1 >>> >>> if none of the above path found then dont copy file1 >>> >>> Thanks, >>> Jeeva >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > > Gary Larizza > Professional Services Engineer > Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Need puppet module for condition copy
Team, Any help Thanks, Jeeva On Fri, Mar 30, 2012 at 12:51 PM, Munna S <19.mu...@gmail.com> wrote: > Team, > > I need a puppet module to copy a file to different location based on > condition check . Below is my requirement > > if /opt/path1 found on the server then copy file1 > if /opt/path2 found on the server then copy file1 > if /opt/path3 found on the server then copy file1 > > if none of the above path found then dont copy file1 > > Thanks, > Jeeva > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Need puppet module for condition copy
Team, I need a puppet module to copy a file to different location based on condition check . Below is my requirement if /opt/path1 found on the server then copy file1 if /opt/path2 found on the server then copy file1 if /opt/path3 found on the server then copy file1 if none of the above path found then dont copy file1 Thanks, Jeeva -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Need modules for cron
Hi Peter, with the help of Jerrery, i got the below module and i modified it as per our requirement. So the below module will create a crontab on root user right ? # Generate the times when the cronjob will run class cron_puppet { $cron_time1= generate('/usr/bin/env', 'sh', '-c', "printf $(($(echo $::ipaddress | awk -F . \'{print \$1+\$2+\$3+\$4}\') % 30))") $cron_time2 = $cron_time1 + 30 cron { 'run-my-puppet-agent': ensure => present, command => /usr/local/sbin/puppetd --onetime --no-daemonize > /dev/null 2>&1, minute => [$cron_time1, $cron_time2], user=> 'root', } } On Thu, Mar 8, 2012 at 10:58 AM, Peter Berghold wrote: > Munna, > > Here is a typical module tree: > > xinetd/ > |-- manifests > | `-- init.pp > `-- templates > > I chose this module as my "pattern" for you to look at because it is a > very simple module. > > In your case I'd be creating > puppetcron/ > `-- manifests > > with a single file "init.pp" with a single class: > > class puppetcron { > cron { run-my-puppet-agent: > minute => "1,31", > command => "/usr/sbin/puppet agent --test" > } > } > > Modify the minute parameter for how often you want cron to execute > puppet. Or add hour, day or whatever to suit your installation. > > Of course you going to have to run the agent manually on each host to > "jumpstart" this process, but there ya have it. > > One thought: > > If you are running out of cron you run the risk of multiple client systems > accessing your puppet master all at once. This can become a scaling issue. > My advice is to just execute "puppet agent" on bootup (or manually) on each > machine and let them figure out when to talk to the master. > > > > On Thu, Mar 8, 2012 at 11:38 AM, Munna S <19.mu...@gmail.com> wrote: > >> Hi Jeffrey, >> >> Thanks for the quick response. >> >> I need to copy the below content into init.pp file which is under my >> module right ? Also i created the module like this. >> >> /etc/puppet/modules/cron_puppet >> >> also should i define my class in the init.pp file. could you please help >> me on this. i am getting errors >> >> -Jeeva >> >> >> >> On Thu, Mar 8, 2012 at 9:50 PM, Jeeva <19.mu...@gmail.com> wrote: >> >>> We are planning to run the puppet client as a cron rather than running >>> as a daemon. Could you please help me in creating a module for running >>> the puppet client as a cron >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > Peter L. Berghold > Owner, Shark River Technical Solutions LLC > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Need modules for cron
Hi Jeffrey, Thanks for the quick response. I need to copy the below content into init.pp file which is under my module right ? Also i created the module like this. /etc/puppet/modules/cron_puppet also should i define my class in the init.pp file. could you please help me on this. i am getting errors -Jeeva On Thu, Mar 8, 2012 at 9:50 PM, Jeeva <19.mu...@gmail.com> wrote: > We are planning to run the puppet client as a cron rather than running > as a daemon. Could you please help me in creating a module for running > the puppet client as a cron -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.