Re: [Puppet Users] Puppet definitions and hashes/arrays syntax problem.
Am I missing soemthing or is one of your two array declarations using a '=' and the other an '=>' ? Seems simple to me if this is a real quote of your actual code.. On Fri, Apr 13, 2012 at 23:17, Rocky wrote: > Hi, I have this definiton for keepalived. And i need to feed the template > this array that i will loop trough. > > site.pp definition snippet: > >> >> keepalived::vrrp_virtual_server { >> >> >> >> real_servers = { realserver1 => { ip => '192.168.33.10', >> >> >> port => '80', >> >> weight => '100' >> >> checktype => 'TCP_CHECK', >> >> connect_timeout => '5', >> >> connect_port => '80' >> >> } >> >> realserver2 => { ip => '192.168.33.20', >> >> port => '80', >> >> >> weight => '100' >> >> checktype => 'TCP_CHECK', >> >> connect_timeout => '5', >> >> connect_port => '80' >> >> >> } >> >> } > > > keepalived manifest snippet: > >> define keepalived::vrrp_virtual_server( >> $real_servers > > > Template snippet: > >> <% real_servers.each do |key,value| -%> >> real_server <%= value['ip'] %> <%= value['port'] %> >> weight <%= value['weight'] %> >> <%= value['checktype'] %> >> connect_timeout <%= value['connect_timeout'] %> >> connect_port <%= value['connect_port'] %> > > > > I keep getting: > > Could not parse for environment production: Syntax error at '='; expected > '}' at /etc/puppet/manifests/site.pp:53 > > What is the right syntax for an array in a definition in site.pp? > > > -- > 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/-/eDzTXglLGksJ. > 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. -- Walter Heck -- follow @walterheck on twitter to see what I'm up to! -- Check out my new startup: Server Monitoring as a Service @ http://tribily.com Follow @tribily on Twitter and/or 'Like' our Facebook page at http://www.facebook.com/tribily -- 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: Hiera Puppet backend - search order question
On 23.3.2012 02:41, Lars Francke wrote: > Hiera in Defined Resource Types: > It's using the calling class and calling module to calculate the > places it looks for its data. For defines though this is not the path > where the define itself was defined (e.g. tmp::register) but the name > it was given when it was declared (e.g. foo). That makes hiera in > defines pretty useless in my opinion but perhaps I'm missing a > important thing? I try do understand the implications of this: class x::foo { $x = hiera('bar') } # is not related with class foo # is not related with define bar define y::foo () { $y = hiera('bar') } # is not related with class foo # is not related with define foo define z::bar () { $z = hiera('bar') } include x::foo y::foo { 'foo': } z::bar { 'foo': } Then the defines would get the value intended for the foo class if $calling_class is used in hiera.conf or if foo::data exists. That would mean that I cannot use hiera for defines. But how am I supposed to get at my data then? -- Kind Regards, Markus Falb signature.asc Description: OpenPGP digital signature
Re: [Puppet Users] slow file transfer using puppet client on solaris
Have you tried other transfers over SSH or similar? I'm guessing this isn't limited to puppet? Check the interface settings and make sure the (default) auto-negotiation worked with your switch... Sun boxes of that age (particularly with hme and le cards) were notoriously bad in negotiating full duplex 10/100Mb with Cisco switches. Generally you just have to hard-set the interface and you're fine after that... Hope that helps... RVT On Fri, Apr 13, 2012 at 7:08 AM, r0k5t4r wrote: > Hi, > > I just wrote a new module and noticed the the file transfer under > solaris is extremely slow. The file is just about 50mbyte and it > transfers ok under Linux but not under Solaris. The Solaris box is > really old (Ulta10) and is running puppet 2.7.9. > > Is this a limitation of the puppet client under Solaris or is it > because the box is too slow to handle the transfer? > > Regards, > Oliver > > -- > 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] Telly: Nagios types moving into Module
I think that would be OK. I'm actually fairly nervous about this new move towards dragging more and more out of the core into modules. It wouldn't be so bad if Puppet had a proper "packaging system" that handled dependencies and so forth, but as it stands I'm just worried about reaching a situation where we're constantly telling people in #puppet "oh, well first you need to get stdlib, nagios, yum, this, that, etc, that's why you can't do this". However assuming this is going ahead then I think the error message should probably for now tell the user that they've been moved AND spit out an appropriate commandline to immediately import the module to the right place. On Fri, Apr 13, 2012 at 1:55 PM, Michael Stahnke wrote: > For the next major Puppet version, code-named Telly, we have some > changes coming. This is the first in a series of emails around these > changes and may require some input from the community. > > For Telly, the nagios types will be moved into a module. This allows > them to be iterated on in isolation from the rest of Puppet's core > release cycle and process. In the future we have plans to move several > other types into modules that can be individually maintained, > improved, tested and used. > > The module for Nagios will be available on the Forge. > > The upgrade path is the thing we need some feedback about. The basic > steps to upgrade would be to setup a Telly master, and then install > the Nagios module via the Puppet Module Tool, which ships integrated > with 2.7.13+ and Telly. > > The only caveat with this is that if, in the past, you were relying on > the Nagios types and forget to install that module (or are unable to > for some reason), you would get a failure. The best proposal we could > come up with was to have the platform team add some code that lets the > user know that the Nagios types have moved. This basically moves this > into a 'fail-well' state. We'll try to provide the best information > possible to the end-user about what is going on. > > Is that an acceptable path moving forward? Comments and discussion > welcome. > > > Mike Stahnke > Community Manager > > -- > 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: agent suddenly disabled
That worked, thanks! On Apr 13, 2:54 pm, Patrick Carlisle wrote: > This is a bug in the error message > (http://projects.puppetlabs.com/issues/13299). The correct command is > 'puppet agent --enable'. -- 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] Supported Ruby Versions for Telly
Puppet Labs is happy to announce full support for Ruby 1.9.3 will be part of the next major release of Puppet, codenamed Telly. Ruby 1.8.7 and 1.9.3 are considered the primary supported Ruby versions, on all platforms including Unix, Linux, Windows, and MacOS-X. Ruby 1.8.5 is also supported, on the agent only. The Puppet 2.7 series featured initial support for the Ruby 1.9 series, and we are happy to see that work completed and brought forward to full production support in the forthcoming release. Other Ruby versions including 1.8.6, 1.9.1, and 1.9.2 are not officially supported. Ruby implementations other than the "MRI" series are not officially supported. We will accept patches that fix issues on other (non MRI) Ruby systems. 1.9.3 was selected due to its inclusion in Fedora 17 (Beefy Miracle) and Ubuntu Precise Pangolin. Previews of Telly should be available in May. If you'd like to see some of the changes happening today, you are also welcome to run Puppet's master branch. If you have questions or concerns, feel free to respond here. Mike Stahnke Community Manager -- 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] agent suddenly disabled
This is a bug in the error message ( http://projects.puppetlabs.com/issues/13299). The correct command is 'puppet agent --enable'. -- 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 CA, why do clients with old certs still work?
I'm in the process of scalling my puppet master to two server with a separate CA. My plan was to establish a new CA and reissue certificates. Part way through the process I noticed a behavior that seems a bit alarming. With one of my clients pointing to the new CA and new Puppetmaster but with the old certificate I ran a 'puppetd --test --server puppet01.mydomain' I was expecting it to fail validation and then regenerate the client certificate. However it ran without error. Thinking maybe it's still hitting the orginal CA, I backed-up and wiped the ssl dir on the puppetmaster and restarted the pupetmaster to generate a new CA. The client still works. There are no signed certificates for this client on either puppetmaster or CA now and it still runs. Am I missing something about how the puppetmaster decides it's okay to talk to a client, or is all the security simply on the client side, and the puppetmaster trusts any puppet client? -- 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] agent suddenly disabled
Disclaimer: I'm a newbie... I've only been using Puppet for a few days. My agent has been running fine for a few days but now when I perform: puppet agent --no-daemonize --verbose --onetime I get the following message: notice: Skipping run of Puppet configuration client; administratively disabled; use 'puppet Puppet configuration client --enabled' to re- enable. I've tried running that command both on the agent and the node and it complains: Error: Unknown Puppet subcommand 'Puppet' Sorry for the dumb question and please let me know if there is a more appropriate forum for this type of question. Thanks! Thomas Kenny -- 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] [Puppet-dev] Announce: Facter 1.6.8rc1 Available
Facter 1.6.8rc1 is a maintenance release candidate with bug fixes and improvements. It includes contributions from the following people: Stefan Schulte, Ken Barber. This release is available for download at: http://downloads.puppetlabs.com/facter/facter-1.6.8rc1.tar.gz See the Verifying Puppet Download section at: http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads Please report feedback via the Puppet Labs Redmine site, using an affected version of 1.6.8rc1: http://projects.puppetlabs.com/projects/facter/ Full Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/Wiki Facter 1.6.8rc1 Release Notes == (#12831) Add rspec tests to have_which method in Resolution Tests cases were originally provided by Ken Barber: Previously we had no coverage of this important method. This adds very basic testing, including failure testing for Windows. (#12831) Fix recursion on first kernel fact resolution We encounter a recursion if we want to detect the kernel fact for the first time: The kernel codeblock calls Facter::Util::Resolution.exec("uname -s") and Facter::Util::Resolution#exec wants to detect if we can use `which` to get the full path of the command. But the method Facter::Util::Resolution#have_which tries to query the kernel fact again to check if we are on windows. Change the check in have_which so we dont have to query the kernel fact. Facter 1.6.8rc1 Changelog === Stefan Shulte (2): b86fe4c (#12831) Add rspec tests to have_which method in Resolution 70be957 (#12831) Fix recursion on first kernel fact resolution -- 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] Puppet not creating manifest file?
what's in your resolv.conf? On Fri, Apr 13, 2012 at 6:59 AM, Kaya Saman wrote: > On Wed, Apr 11, 2012 at 1:20 PM, Peter Berghold > wrote: > > Kaya, > > > > Did you clean out: > > > > /var/lib/puppet > > /etc/puppet/ssl > > > > > > before you re-ran? > > > > > > The error you are seeing indicates there is a mismatch between hostname > is > > associated with the server's certificate and what notion the client has > for > > the server's name. > > > > Do you have DNS configured on the client (and server) and what does your > > resolv.conf have in it? That could effect what the client sees as its > own > > name as well as the server's name. > > > > If you do not have DNS configured on the client then there are other > things > > to look at. What do you see if you run the command > > > > ping puppet -c 1 > > > > This should answer a lot.. > > > > > > > > Ok well here is the DNS info: > > From the server ps.jabber.com {as it's test FQDN name} > > [root@ps ~]# nslookup ps.jabber.com > Server: 10.0.0.1 > Address:10.0.0.1#53 > > Name: ps.jabber.com > Address: 10.0.0.6 > > [root@ps ~]# nslookup pc.jabber.com > Server: 10.0.0.1 > Address:10.0.0.1#53 > > Name: pc.jabber.com > Address: 10.0.0.4 > > > From the client pc.jabber.com {as it's test FQDN name} > > > [root@pc ~]# nslookup ps.jabber.com > Server: 10.0.0.1 > Address:10.0.0.1#53 > > Name: ps.jabber.com > Address: 10.0.0.6 > > [root@pc ~]# nslookup pc.jabber.com > Server: 10.0.0.1 > Address:10.0.0.1#53 > > Name: pc.jabber.com > Address: 10.0.0.4 > > > > Here is the Ping info: > > > [root@pc ~]# ping puppet -c 1 > PING ps.jabber.com (10.0.0.6) 56(84) bytes of data. > 64 bytes from ps.jabber.com (10.0.0.6): icmp_req=1 ttl=64 time=0.520 ms > > --- ps.jabber.com ping statistics --- > 1 packets transmitted, 1 received, 0% packet loss, time 0ms > rtt min/avg/max/mdev = 0.520/0.520/0.520/0.000 ms > > > > Additionally I did clean out: > > > /var/lib/puppet > > /etc/puppet/ss > > > on the client and server. > > > But still same issues. > > > I will keep playing but not sure if it's an internal puppet thing or > an OS think? > > > Regards, > > > Kaya > > -- > 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.
[Puppet Users] Re: [Puppet-dev] Telly: Nagios types moving into Module
By 2.7.13+ of course Mike means 2.7.14 and later (because 2.7.13 was a security release). Look for an rc of 2.7.14 later today with the module face included. -Matthaus On Fri, Apr 13, 2012 at 10:55 AM, Michael Stahnke wrote: > For the next major Puppet version, code-named Telly, we have some > changes coming. This is the first in a series of emails around these > changes and may require some input from the community. > > For Telly, the nagios types will be moved into a module. This allows > them to be iterated on in isolation from the rest of Puppet's core > release cycle and process. In the future we have plans to move several > other types into modules that can be individually maintained, > improved, tested and used. > > The module for Nagios will be available on the Forge. > > The upgrade path is the thing we need some feedback about. The basic > steps to upgrade would be to setup a Telly master, and then install > the Nagios module via the Puppet Module Tool, which ships integrated > with 2.7.13+ and Telly. > > The only caveat with this is that if, in the past, you were relying on > the Nagios types and forget to install that module (or are unable to > for some reason), you would get a failure. The best proposal we could > come up with was to have the platform team add some code that lets the > user know that the Nagios types have moved. This basically moves this > into a 'fail-well' state. We'll try to provide the best information > possible to the end-user about what is going on. > > Is that an acceptable path moving forward? Comments and discussion welcome. > > > Mike Stahnke > Community Manager > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to puppet-...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?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] Telly: Nagios types moving into Module
For the next major Puppet version, code-named Telly, we have some changes coming. This is the first in a series of emails around these changes and may require some input from the community. For Telly, the nagios types will be moved into a module. This allows them to be iterated on in isolation from the rest of Puppet's core release cycle and process. In the future we have plans to move several other types into modules that can be individually maintained, improved, tested and used. The module for Nagios will be available on the Forge. The upgrade path is the thing we need some feedback about. The basic steps to upgrade would be to setup a Telly master, and then install the Nagios module via the Puppet Module Tool, which ships integrated with 2.7.13+ and Telly. The only caveat with this is that if, in the past, you were relying on the Nagios types and forget to install that module (or are unable to for some reason), you would get a failure. The best proposal we could come up with was to have the platform team add some code that lets the user know that the Nagios types have moved. This basically moves this into a 'fail-well' state. We'll try to provide the best information possible to the end-user about what is going on. Is that an acceptable path moving forward? Comments and discussion welcome. Mike Stahnke Community Manager -- 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} > ", > > 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 > > > > -- > 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
Re: [Puppet Users] Re: service restart upon notify
Works like a charm now: include mysoftware::service and notify => Class["mysoftware::service"], Thanks! 2012/4/13 Sans > "notify => Class["mysoftware::service"]" should work without any > problem. Did you remember to include it beforehand? > >include mysoftware::service > > > "notify => Exec['mysoftwarerestart']" should work too. Cheers!! > > > > On Apr 12, 11:39 pm, Trevor Smith wrote: > > On Thursday, April 12, 2012 4:07:40 PM UTC-4, puppetguest wrote: > > > > > I have choosen to split my module into several .pp files as i have > > > seen in an example and makes it cleaner i think. > > > > > \modules\mysoftware\ > > > init.pp > > > install.pp > > > config.pp > > > service.pp > > > > > Is that recommended or too many disadvantages ? > > > > > So my install.pp went through fine, config.pp as well. > > > When i change a config-file and puppet runs again i want the automatic > > > service restart but doesnt work unfortunately. > > > > > Does someone know the proper syntax how to trigger from config.pp the > > > function in service.pp for such a case ? > > > > > Examples like these dont work :-( > > >notify => Class["mysoftware::service"] > > >notify => Class["mysoftware::service::mysoftwarerestart"] > > >... > > > > How about: > > > > notify => Exec['mysoftwarerestart'] > > > > You could also look at 'refreshonly' under the type reference for exec: > http://docs.puppetlabs.com/references/2.7.0/type.html#exec > > > > > > > > > > > > > > > > > I should mention that the service has to restart via a shell-script, > > > not via init services ! > > > So may be the service.pp needs some corrections too ? > > > > > service.pp > > > > > class mysoftware::service ( > > > $user= "myuser", > > > ) { > > > > > exec {"mysoftwarerestart": > > > command => "/opt/mysoftware/bin/script.sh restart", > > > require => Class["mysoftware::config"], > > > } > > > > > } > > -- > 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] Puppet definitions and hashes/arrays syntax problem.
Hi, I have this definiton for keepalived. And i need to feed the template this array that i will loop trough. site.pp definition snippet: > keepalived::vrrp_virtual_server { real_servers = { realserver1 => { ip => '192.168.33.10', > port => '80', weight => '100' checktype => 'TCP_CHECK', connect_timeout => '5', connect_port => '80' } realserver2 => { ip => '192.168.33.20', port => '80', > weight => '100' checktype => 'TCP_CHECK', connect_timeout => '5', connect_port => '80' > } } keepalived manifest snippet: define keepalived::vrrp_virtual_server( > $real_servers > Template snippet: <% real_servers.each do |key,value| -%> > real_server <%= value['ip'] %> <%= value['port'] %> > weight <%= value['weight'] %> > <%= value['checktype'] %> > connect_timeout <%= value['connect_timeout'] %> > connect_port <%= value['connect_port'] %> I keep getting: *Could not parse for environment production: Syntax error at '='; expected '}' at /etc/puppet/manifests/site.pp:53 * What is the right syntax for an array in a definition in site.pp? -- 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/-/eDzTXglLGksJ. 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: OpenSUSE weirdness.
There was a bug in SLES 11.1 similar to this one where puppet agent in daemon mode would hang. Our solution was to update to a newer package. On Mon, Apr 9, 2012 at 5:03 PM, scot spinner wrote: > I'm having a very similar issue. Did anyone figure out a solution to > this? > > On Mar 20, 10:15 am, Douglas Garstang wrote: >> I'm having some weird issues with puppet 2.7.6 on OpenSUSE. >> >> When I run puppet in the foreground, it's all fine. However, when I >> run it as aservice, all that get's logged is: >> >> abc:/var/log/puppet # cat puppet.log >> Tue Mar 20 10:11:57 -0700 2012 Puppet (warning): iconv doesn't seem to >> support UTF-8/UTF-16 conversions >> Tue Mar 20 10:11:58 -0700 2012 Puppet (notice): Reopening log files >> Tue Mar 20 10:11:57 -0700 2012 Puppet (warning): iconv doesn't seem to >> support UTF-8/UTF-16 conversions >> >> Although, it seems to be running fine. When I stop the daemon, the >> following is immediately flushed to puppet.log: >> >> Tue Mar 20 10:12:47 -0700 2012 Puppet (notice): Starting Puppet client >> version 2.7.6 >> Tue Mar 20 10:12:48 -0700 2012 Puppet (err):Couldnotretrieve >> catalog from remote server:getaddrinfo:Nameorservicenotknown >> Tue Mar 20 10:12:48 -0700 2012 Puppet (notice): Using cached catalog >> Tue Mar 20 10:12:50 -0700 2012 >> /Stage[main]/Sudo::Common/File[/etc/sudoers] >> (err):Couldnotevaluate:getaddrinfo:NameorservicenotknownCouldnotretrieve >> file metadata for >> puppet:///modules/sudo/etc/sudoers:getaddrinfo:Nameorservicenotknownat >> /etc/puppet/modules/sudo/manifests/common.pp:17 >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Snmp::Agent/File[/etc/snmp/snmpd.conf] >> (err):Couldnotevaluate:getaddrinfo:NameorservicenotknownCouldnotretrieve >> file metadata for >> puppet:///modules/snmp/etc/snmp/snmpd.conf:getaddrinfo:Nameorservicenotknownat >> /etc/puppet/modules/snmp/manifests/agent.pp:26 >> Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Snmp::Agent/Service[snmpd] >> (notice): Dependency File[/etc/snmp/snmpd.conf] has failures: true >> Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Snmp::Agent/Service[snmpd] >> (warning): Skipping because of failed dependencies >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Ssh::Server/File[/etc/ssh/sshd_config] >> (err):Couldnotevaluate:getaddrinfo:NameorservicenotknownCouldnotretrieve >> file metadata for >> puppet:///modules/ssh/etc/ssh/sshd_config:getaddrinfo:Nameorservicenotknownat >> /etc/puppet/modules/ssh/manifests/server.pp:26 >> Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Ssh::Server/Service[sshd] >> (notice): Dependency File[/etc/ssh/sshd_config] has failures: true >> Tue Mar 20 10:12:51 -0700 2012 /Stage[main]/Ssh::Server/Service[sshd] >> (warning): Skipping because of failed dependencies >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Mcollective::Agent/File[/usr/libexec/mcollective/mcollective/agent/package.rb] >> (err):Couldnotevaluate:getaddrinfo:NameorservicenotknownCouldnotretrieve >> file metadata for >> puppet:///modules/mcollective/agent/package.rb:getaddrinfo:Nameorservicenotknownat >> /etc/puppet/modules/mcollective/manifests/agent.pp:43 >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Mcollective::Agent/Service[mcollective] (notice): >> Dependency File[/usr/libexec/mcollective/mcollective/agent/package.rb] >> has failures: true >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Mcollective::Agent/Service[mcollective] (warning): >> Skipping because of failed dependencies >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Postfix::Server/File[/etc/postfix/main.cf] >> (err):Couldnotevaluate:getaddrinfo:NameorservicenotknownCouldnot >> retrieve file metadata for >> puppet:///modules/postfix/etc/postfix/main.cf:getaddrinfo:Nameorservicenotknownat >> /etc/puppet/modules/postfix/manifests/server.pp:27 >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Postfix::Server/Service[postfix] (notice): Dependency >> File[/etc/postfix/main.cf] has failures: true >> Tue Mar 20 10:12:51 -0700 2012 >> /Stage[main]/Postfix::Server/Service[postfix] (warning): Skipping >> because of failed dependencies >> Tue Mar 20 10:12:51 -0700 2012 Puppet (notice): Finished catalog run >> in 1.82 seconds >> Tue Mar 20 10:12:52 -0700 2012 Puppet (err):Couldnotsend >> report:getaddrinfo:Nameorservicenotknown >> Tue Mar 20 10:13:24 -0700 2012 Puppet (notice): Caught TERM; calling stop >> >> I'm rather confused. I tried putting autoflush = true in the [user] >> section of puppet.conf but it had no effect. I also don't know why >> thosenameserviceerrors are occurring. >> >> Doug. > > -- > 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] Re: using array parameters with inherited parameterized classes
On Apr 13, 4:07 am, Craig Dunn wrote: > > class depacks( > > $packages = "$params::packages" > > ) inherits params { > > > package{ $packages: > > Putting quotes around $params::packages is making $packages a string > rather than an array. Remove the quotes and it should work > Thanks for pointing it out Craig. It's working now. -- Shantanu -- 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] rdoc escaping help
Hello, Trying to be a good boy and put rdoc headers in my classes. I am trying to put some scoped variables into the output i.e. # [*myclass::params::server*] # This is derived from the myclass::params class which returns the server to configure # # [*myclass::params::venafiport*] # This is derived from the myclass::params class which returns the port to use Which should hopefully return a list with some bold text. But does not. Any ideas how to escape these tried various things but not a lot of success. Thanks Paul -- 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] slow file transfer using puppet client on solaris
Hi, I just wrote a new module and noticed the the file transfer under solaris is extremely slow. The file is just about 50mbyte and it transfers ok under Linux but not under Solaris. The Solaris box is really old (Ulta10) and is running puppet 2.7.9. Is this a limitation of the puppet client under Solaris or is it because the box is too slow to handle the transfer? Regards, Oliver -- 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: Implementing hooks
On 12-04-12 02:10 AM, Gabriel Filion wrote: > Do you guys know if it would be possible to implement a way to "hook" my > extraneous logic into the define so that I don't need to modify the > module directly anymore? oh, I think I've just found something that does pretty much exactly this: https://github.com/example42/puppet-openssh/blob/master/manifests/init.pp this class can include an arbitrary $my_class class to extend functionality. maybe I can do the same thing with an arbitrary define? I'll try that out -- Gabriel Filion -- 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: Does one puppet master support multiply users to manage their resources?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri 13 Apr 2012 12:01:13 BST, Sans wrote: > I'm not entirely sure but I don't think you can do that with single > server - Puppet is actually for that. Someone please correct me if I'm > wrong. But, as Puppet can maintain itself, all your users can use > their machine as puppet-master and puppet-agent at the same time and > can do whatever they want. Cheers!! > > > On Apr 13, 4:06 am, runner wrote: >> Hi, >> >> I am a new user of puppet. We want every user of our group to manage >> software in his/her machines. How can puppet support this? Thank you. >> >> BR/Peng Yong > I'd say there's a few ways to achieve that. Sans describes one of them - - local catalogs with local masters (or just puppet apply) If you want to run a standard master/slaves setup, the you could either keep the manifests in a version control system (say, git) and give your devs access to git. For more fine-grained control, put the lists of packages into some form of external data source (an ENC, or an external plugin like Hiera) and give your devs access to the lists on their machine. Of course, the latter reuires that your modules are (re)written to get their data appropriately. Cheers, Greg - --- OpenPGP -> KeyID: CA0AEB93 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+IH+kACgkQ8O7RN8oK65ONxgCfQOdwmmu/8PmONPz3f8Wci1SE Ph8AoJLNzc/TwWyCdnVG9Lu8lWR7xwnE =gf7z -END PGP SIGNATURE- -- 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] override/replace native types
Le 13/04/2012 12:07, Craig Dunn a écrit : To fail the resource if slaptest fails... service { "slapd": ensure => "running", start => "/usr/sbin/slaptest && service slapd start", } To continue silently but not start slapd service { "slapd": ensure => "running", start => "( /usr/sbin/slaptest && service slapd start) || /bin/true", } Good point, I didn't understood this property could be defined as an arbitrary shell command. But, IMO, a service init script should take care of its own pre-req's... Well, I see at least two reasons not to do it. First, I'd actually like to make more than just 'restart only if correct', rather something as 'if correct then reload, else notify'. In order to use arbitrary notification mechanism (nagios, in our case, with a mail fallback), I'd rather manage this out of init script. The second is to avoid interfering with something wich is part of the distribution. If I'm forking redhat iniscript, I have to follow any fix/evolution/whatever, which is painful. BTW, redhat initscript already support this kind of check, but only at start stage, meaning restart action will do 'stop, check, and refuse to start' :( -- BOFH excuse #230: Lusers learning curve appears to be fractal -- 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: Does one puppet master support multiply users to manage their resources?
I'm not entirely sure but I don't think you can do that with single server - Puppet is actually for that. Someone please correct me if I'm wrong. But, as Puppet can maintain itself, all your users can use their machine as puppet-master and puppet-agent at the same time and can do whatever they want. Cheers!! On Apr 13, 4:06 am, runner wrote: > Hi, > > I am a new user of puppet. We want every user of our group to manage > software in his/her machines. How can puppet support this? Thank you. > > BR/Peng Yong -- 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] Puppet not creating manifest file?
On Wed, Apr 11, 2012 at 1:20 PM, Peter Berghold wrote: > Kaya, > > Did you clean out: > > /var/lib/puppet > /etc/puppet/ssl > > > before you re-ran? > > > The error you are seeing indicates there is a mismatch between hostname is > associated with the server's certificate and what notion the client has for > the server's name. > > Do you have DNS configured on the client (and server) and what does your > resolv.conf have in it? That could effect what the client sees as its own > name as well as the server's name. > > If you do not have DNS configured on the client then there are other things > to look at. What do you see if you run the command > > ping puppet -c 1 > > This should answer a lot.. > > > Ok well here is the DNS info: >From the server ps.jabber.com {as it's test FQDN name} [root@ps ~]# nslookup ps.jabber.com Server: 10.0.0.1 Address:10.0.0.1#53 Name: ps.jabber.com Address: 10.0.0.6 [root@ps ~]# nslookup pc.jabber.com Server: 10.0.0.1 Address:10.0.0.1#53 Name: pc.jabber.com Address: 10.0.0.4 >From the client pc.jabber.com {as it's test FQDN name} [root@pc ~]# nslookup ps.jabber.com Server: 10.0.0.1 Address:10.0.0.1#53 Name: ps.jabber.com Address: 10.0.0.6 [root@pc ~]# nslookup pc.jabber.com Server: 10.0.0.1 Address:10.0.0.1#53 Name: pc.jabber.com Address: 10.0.0.4 Here is the Ping info: [root@pc ~]# ping puppet -c 1 PING ps.jabber.com (10.0.0.6) 56(84) bytes of data. 64 bytes from ps.jabber.com (10.0.0.6): icmp_req=1 ttl=64 time=0.520 ms --- ps.jabber.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.520/0.520/0.520/0.000 ms Additionally I did clean out: > /var/lib/puppet > /etc/puppet/ss on the client and server. But still same issues. I will keep playing but not sure if it's an internal puppet thing or an OS think? Regards, Kaya -- 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] override/replace native types
BTW, the exact intent is to allow to test the configuration file syntax before reloading a service, and avoid reloading it with an invalid state. Something as: file { "/etc/openldap/slapd.conf": content => template("slapd.conf.erb"), notify => Service["slapd"] } service { "slapd": ensure => "running", onlyif => "/usr/sbin/slaptest" } Personally, I think this should be taken care of in the init script. But if you really want to do it from puppet I suppose you could override the start parameter of the service type... To fail the resource if slaptest fails... service { "slapd": ensure => "running", start => "/usr/sbin/slaptest && service slapd start", } To continue silently but not start slapd service { "slapd": ensure => "running", start => "( /usr/sbin/slaptest && service slapd start) || /bin/true", } But, IMO, a service init script should take care of its own pre-req's... HTH Craig -- Craig Dunn | http://www.craigdunn.org Yahoo/Skype: craigrdunn | Twitter: @crayfishX -- 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] puppet environments - environment specific configs and templates
I just want to sanity check this before reinventing the wheel or more importantly doing something outside the "norm" which may come back to bite me on another puppet version release. Current versions - master 2.7.12, client 2.7.13. It appears that although puppet environments allows for environment specific modules, however does not allow for environment specific configurations (files) and templates only. The environment modules implementation does not lend itself to the DRY principle, as the modules have to be duplicated per environment so there is no scope for "common class, different environment configurations and templates". I do realise that erb templating facilitates this, however I want to isolate environment configurations and not have templates that are common for all environments. Use case which does NOT work: Common mysql-server class for all environments: modules/mysql-server/manifests/init.pp NO modules/mysql-server/files/${hostname}.my.cnf Environment specific files: environments/${environment}/modules/mysql-server/files/$ {hostname}.my.cnf NO environments/${environment}/modules/mysql-server/manifests/init.pp This errors with: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class mysql-server for zpf-masterdb-dev-1-80g- ruk at /etc/puppet/modules/zpf-masterdb/manifests/init.pp:46 on node zpf-masterdb-dev-1-80g-ruk So if an environments/${environment}/modules/mysql-server directory exists, puppet expects a manifest in it and will not use the module/ mysql-server/manifest/init.pp, I suppose this is the expected behaviour? This means that a workaround structure needs to be put in place to faciliate a "common class, environment specific configurations and templates. Is that correct? Workaround by adding: environments/${environment}/configs/mysql-server/files/$ {hostname}.my.cnf and declaring the full path in the manifest source => "puppet:///environments/${environment}/configs/mysql- server/${hostname}.my.cnf", Is there a "puppet standard method" that can achieve a common class and environment specific files and templates? -- 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] override/replace native types
Hello list. I'd like to implement a basic 'onlyif' property, as existing in 'exec' type, to 'service' type. Rather than patching the original puppet code, I think I could use the custom type mechanism, and implement my own 'conditional_service' type. However, in order to keep the benefit of existing providers, I think renaming the type isn't the best solution. So, would it possible to either inherit the original type definition, and just add the new property, or distributing a modified type copy as part of a module would also replace original type definition for this module ? BTW, the exact intent is to allow to test the configuration file syntax before reloading a service, and avoid reloading it with an invalid state. Something as: file { "/etc/openldap/slapd.conf": content => template("slapd.conf.erb"), notify => Service["slapd"] } service { "slapd": ensure => "running", onlyif => "/usr/sbin/slaptest" } -- BOFH excuse #362: Plasma conduit breach -- 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] Does one puppet master support multiply users to manage their resources?
Hi, I am a new user of puppet. We want every user of our group to manage software in his/her machines. How can puppet support this? Thank you. BR/Peng Yong -- 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] using array parameters with inherited parameterized classes
class depacks( $packages = "$params::packages" ) inherits params { package{ $packages: Putting quotes around $params::packages is making $packages a string rather than an array. Remove the quotes and it should work Regards Craig -- Craig Dunn | http://www.craigdunn.org Yahoo/Skype: craigrdunn | Twitter: @crayfishX -- 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: service restart upon notify
"notify => Class["mysoftware::service"]" should work without any problem. Did you remember to include it beforehand? include mysoftware::service "notify => Exec['mysoftwarerestart']" should work too. Cheers!! On Apr 12, 11:39 pm, Trevor Smith wrote: > On Thursday, April 12, 2012 4:07:40 PM UTC-4, puppetguest wrote: > > > I have choosen to split my module into several .pp files as i have > > seen in an example and makes it cleaner i think. > > > \modules\mysoftware\ > > init.pp > > install.pp > > config.pp > > service.pp > > > Is that recommended or too many disadvantages ? > > > So my install.pp went through fine, config.pp as well. > > When i change a config-file and puppet runs again i want the automatic > > service restart but doesnt work unfortunately. > > > Does someone know the proper syntax how to trigger from config.pp the > > function in service.pp for such a case ? > > > Examples like these dont work :-( > > notify => Class["mysoftware::service"] > > notify => Class["mysoftware::service::mysoftwarerestart"] > > ... > > How about: > > notify => Exec['mysoftwarerestart'] > > You could also look at 'refreshonly' under the type reference for exec: > http://docs.puppetlabs.com/references/2.7.0/type.html#exec > > > > > > > > > I should mention that the service has to restart via a shell-script, > > not via init services ! > > So may be the service.pp needs some corrections too ? > > > service.pp > > > class mysoftware::service ( > > $user = "myuser", > > ) { > > > exec {"mysoftwarerestart": > > command => "/opt/mysoftware/bin/script.sh restart", > > require => Class["mysoftware::config"], > > } > > > } -- 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.