Hello it is possible to define something like this? exec { "openvpn_reload" : command => "/etc/init.d/openvpn reload", user => root, require => [ File[ "openvpn_client.conf"] OR File ["openvpn_server"] ] } is possible what would be the correct syntax? thanks -- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote:> Hello > > it is possible to define something like this? > > exec { "openvpn_reload" : > command => "/etc/init.d/openvpn reload", > user => root, > require => [ File[ "openvpn_client.conf"] OR File > ["openvpn_server"] ]I don''t recommend using an exec resource for this purpose since it will fire every time puppet runs and doesn''t describe state but rather an action. Are you having a problem sending a refresh event to the OpenVPN service resource? I recommend configuring the configuration files to notify Service["openvpn"] Hope this helps, -- Jeff McCune http://www.puppetlabs.com/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi Jeff well the thing is a client uses openvpn_client.conf and the server openvpn_server.conf (our setup) so i wanted to do service { "openvpn" : ensure => runnning, require => [ Package["openvpn"], File[ "openvpn.conf"] ] } then i have a client.pp and server.pp for the server: file ( "openvpn.conf" : path => "/etc/openvpn/openvpn_xxxx.conf", source => "puppet:///openvpn/etc/openvpn/openvpn.conf-$hostname", Notify => Service[ "openvpn" ] } so XXX become either client or server BUT THEN !! we have 1 server that is both server AND client so puppet complains file openvpn.conf is define twice since the servers includes client,pp and server.pp any suggestion ? (possible it to not require the file openvpn.conf in the service above...) thanks -ls On Wed, Sep 22, 2010 at 6:04 PM, Jeff McCune <jeff@puppetlabs.com> wrote:> On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote: > > Hello > > > > it is possible to define something like this? > > > > exec { "openvpn_reload" : > > command => "/etc/init.d/openvpn reload", > > user => root, > > require => [ File[ "openvpn_client.conf"] OR File > > ["openvpn_server"] ] > > I don''t recommend using an exec resource for this purpose since it > will fire every time puppet runs and doesn''t describe state but rather > an action. > > Are you having a problem sending a refresh event to the OpenVPN > service resource? > > I recommend configuring the configuration files to notify > Service["openvpn"] > > Hope this helps, > -- > Jeff McCune > http://www.puppetlabs.com/ > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sep 22, 2010, at 6:14 PM, Luc Suryo wrote:> Hi Jeff > > well the thing is a client uses openvpn_client.conf and the server openvpn_server.conf (our setup) > so i wanted to do > > > service { "openvpn" : > ensure => runnning, > require => [ Package["openvpn"], File[ "openvpn.conf"] ] > }This file require isn''t needed because the notify implies it.> then i have a client.pp and server.pp for the server: > > file ( "openvpn.conf" : > path => "/etc/openvpn/openvpn_xxxx.conf", > source => "puppet:///openvpn/etc/openvpn/openvpn.conf-$hostname", > Notify => Service[ "openvpn" ] > }The answer is actually pretty simple. Just name the files client.conf and server.conf. Openvpn will use all files ending in ".conf".> so XXX become either client or server BUT THEN !! we have 1 server that is > both server AND client > > so puppet complains file openvpn.conf is define twice since the servers includes client,pp > and server.pp > > any suggestion ? > > (possible it to not require the file openvpn.conf in the service above...) > > thanks > > -ls > > On Wed, Sep 22, 2010 at 6:04 PM, Jeff McCune <jeff@puppetlabs.com> wrote: > On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote: > > Hello > > > > it is possible to define something like this? > > > > exec { "openvpn_reload" : > > command => "/etc/init.d/openvpn reload", > > user => root, > > require => [ File[ "openvpn_client.conf"] OR File > > ["openvpn_server"] ] > > I don''t recommend using an exec resource for this purpose since it > will fire every time puppet runs and doesn''t describe state but rather > an action. > > Are you having a problem sending a refresh event to the OpenVPN > service resource? > > I recommend configuring the configuration files to notify Service["openvpn"] > > Hope this helps, > -- > Jeff McCune > http://www.puppetlabs.com/ > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > > > > > -- > -ls > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
yes I just did that., and yes I do know that openvpn will start the conf file as defined in the /etc/sysconfig/openvpn or /etc/default/openvpn just it would had been nice to define and OR for other special cases :) just implemented a work around and it works thanks On Wed, Sep 22, 2010 at 6:36 PM, Patrick <kc7zzv@gmail.com> wrote:> > On Sep 22, 2010, at 6:14 PM, Luc Suryo wrote: > > Hi Jeff > > well the thing is a client uses openvpn_client.conf and the server > openvpn_server.conf (our setup) > so i wanted to do > > > service { "openvpn" : > ensure => runnning, > require => [ Package["openvpn"], File[ "openvpn.conf"] ] > } > > > This file require isn''t needed because the notify implies it. > > then i have a client.pp and server.pp for the server: > > file ( "openvpn.conf" : > path => "/etc/openvpn/openvpn_xxxx.conf", > source => "puppet:///openvpn/etc/openvpn/openvpn.conf-$hostname", > Notify => Service[ "openvpn" ] > } > > > The answer is actually pretty simple. Just name the files client.conf and > server.conf. Openvpn will use all files ending in ".conf". > > so XXX become either client or server BUT THEN !! we have 1 server that is > both server AND client > > so puppet complains file openvpn.conf is define twice since the servers > includes client,pp > and server.pp > > any suggestion ? > > (possible it to not require the file openvpn.conf in the service above...) > > thanks > > -ls > > On Wed, Sep 22, 2010 at 6:04 PM, Jeff McCune <jeff@puppetlabs.com> wrote: > >> On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote: >> > Hello >> > >> > it is possible to define something like this? >> > >> > exec { "openvpn_reload" : >> > command => "/etc/init.d/openvpn reload", >> > user => root, >> > require => [ File[ "openvpn_client.conf"] OR File >> > ["openvpn_server"] ] >> >> I don''t recommend using an exec resource for this purpose since it >> will fire every time puppet runs and doesn''t describe state but rather >> an action. >> >> Are you having a problem sending a refresh event to the OpenVPN >> service resource? >> >> I recommend configuring the configuration files to notify >> Service["openvpn"] >> >> Hope this helps, >> -- >> Jeff McCune >> http://www.puppetlabs.com/ >> >> -- >> 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > > > -- > -ls > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sep 22, 2010, at 6:40 PM, Luc Suryo wrote:> yes I just did that., and yes I do know that openvpn will start the conf file as defined in the > /etc/sysconfig/openvpn or /etc/default/openvpn > > > just it would had been nice to define and OR for other special cases :)The problem is that I never understood what you wanted puppet to do. You told it to copy two different files to the same place. Did you want it to concatenate them together?> > On Wed, Sep 22, 2010 at 6:36 PM, Patrick <kc7zzv@gmail.com> wrote: > > On Sep 22, 2010, at 6:14 PM, Luc Suryo wrote: > >> Hi Jeff >> >> well the thing is a client uses openvpn_client.conf and the server openvpn_server.conf (our setup) >> so i wanted to do >> >> >> service { "openvpn" : >> ensure => runnning, >> require => [ Package["openvpn"], File[ "openvpn.conf"] ] >> } > > This file require isn''t needed because the notify implies it. > >> then i have a client.pp and server.pp for the server: >> >> file ( "openvpn.conf" : >> path => "/etc/openvpn/openvpn_xxxx.conf", >> source => "puppet:///openvpn/etc/openvpn/openvpn.conf-$hostname", >> Notify => Service[ "openvpn" ] >> } > > The answer is actually pretty simple. Just name the files client.conf and server.conf. Openvpn will use all files ending in ".conf". > >> so XXX become either client or server BUT THEN !! we have 1 server that is >> both server AND client >> >> so puppet complains file openvpn.conf is define twice since the servers includes client,pp >> and server.pp >> >> any suggestion ? >> >> (possible it to not require the file openvpn.conf in the service above...) >> >> thanks >> >> -ls >> >> On Wed, Sep 22, 2010 at 6:04 PM, Jeff McCune <jeff@puppetlabs.com> wrote: >> On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote: >> > Hello >> > >> > it is possible to define something like this? >> > >> > exec { "openvpn_reload" : >> > command => "/etc/init.d/openvpn reload", >> > user => root, >> > require => [ File[ "openvpn_client.conf"] OR File >> > ["openvpn_server"] ] >> >> I don''t recommend using an exec resource for this purpose since it >> will fire every time puppet runs and doesn''t describe state but rather >> an action. >> >> Are you having a problem sending a refresh event to the OpenVPN >> service resource? >> >> I recommend configuring the configuration files to notify Service["openvpn"] >> >> Hope this helps, >> -- >> Jeff McCune >> http://www.puppetlabs.com/ >> >> -- >> 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+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> >> >> >> >> -- >> -ls >> >> -- >> 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+unsubscribe@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+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > > > > -- > -ls > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Sep 22, 2010 at 6:40 PM, Luc Suryo <lsuryo@gmail.com> wrote:> yes I just did that., and yes I do know that openvpn will start the conf > file as defined in the > /etc/sysconfig/openvpn or /etc/default/openvpn > > > just it would had been nice to define and OR for other special cases :)Like what? I can''t really come up with any use cases that notify doesn''t perfectly address. If a service relates to two files and should be refreshed, configuring each file to notify the service results in the exact same truth table as a OR would.> just implemented a work around and it worksWhat''s the work around? -- Jeff McCune http://www.puppetlabs.com/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsuryo@gmail.com> wrote:> Hello > > it is possible to define something like this? > > exec { "openvpn_reload" : > command => "/etc/init.d/openvpn reload", > user => root, > require => [ File[ "openvpn_client.conf"] OR File > ["openvpn_server"] ]Normally when people tell me they want this, they really want to require the *class* that both the above resources are defined in, and logic inside that class decides which resources are being instantiated and how.> > } > > is possible what would be the correct syntax? > > thanks > > -- > -ls > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- nigel -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I end up doing to different ''file'' definition and remove the ''require file '' part of the service and using exec instead.. tested and works On Wed, Sep 22, 2010 at 9:48 PM, Jeff McCune <jeff@puppetlabs.com> wrote:> On Wed, Sep 22, 2010 at 6:40 PM, Luc Suryo <lsuryo@gmail.com> wrote: > > yes I just did that., and yes I do know that openvpn will start the conf > > file as defined in the > > /etc/sysconfig/openvpn or /etc/default/openvpn > > > > > > just it would had been nice to define and OR for other special cases :) > > Like what? I can''t really come up with any use cases that notify > doesn''t perfectly address. > > If a service relates to two files and should be refreshed, configuring > each file to notify the service results in the exact same truth table > as a OR would. > > > just implemented a work around and it works > > What''s the work around? > > -- > Jeff McCune > http://www.puppetlabs.com/ > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
well here is the situation we have system that are vpn client and soem are vpn server however! we have 2 that are both! what i want todo is taht IS there is a new client of server configuration (openvpn_client.conf or openvpn_server.conf) and teh new file is pushed I need the service tobe restarted (not reload! ) So being a novice in Puppet I wanted the service to depend on the config file being updated.. make sense ? On Wed, Sep 22, 2010 at 9:48 PM, Jeff McCune <jeff@puppetlabs.com> wrote:> On Wed, Sep 22, 2010 at 6:40 PM, Luc Suryo <lsuryo@gmail.com> wrote: > > yes I just did that., and yes I do know that openvpn will start the conf > > file as defined in the > > /etc/sysconfig/openvpn or /etc/default/openvpn > > > > > > just it would had been nice to define and OR for other special cases :) > > Like what? I can''t really come up with any use cases that notify > doesn''t perfectly address. > > If a service relates to two files and should be refreshed, configuring > each file to notify the service results in the exact same truth table > as a OR would. > > > just implemented a work around and it works > > What''s the work around? > > -- > Jeff McCune > http://www.puppetlabs.com/ > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 09/23/2010 05:13 PM, Luc Suryo wrote:> well here is the situation > > we have system that are vpn client and soem are vpn server however! we have > 2 that are both! > > what i want todo is taht IS there is a new client of server configuration > (openvpn_client.conf or openvpn_server.conf) and teh new file is pushed I > need the service tobe restarted (not reload! ) > > So being a novice in Puppet I wanted the service to depend on the config > file being updated.. > > make sense ? >In principle, yes. However, you have a conceptual mixup of "require" and "subscribe". You are actually looking for the latter. Besides, subscribe has an implicit "or" semantics, in that subsribing to several resources, an update to any of them will trigger the subscription. As "require" is only about ordering resources, it makes no sense to define logical relations between multiple required resources. They will all be handled before the one requiring them. HTH, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Then would the service be define as this? service { "openvpn::base" : name=> "openvpn", ensure => running, subscribe => [ File["openvpn_client.conf], File["openvpn_server,conf]] } so it a server includes the openvpn class it could have the client, or the server or both config, in case of both that would work... but what if it is only a client or sever? it errors with err: Could not run Puppet configuration client: Could not find dependency File[openvpn_server.conf] for Service[openvpn::base] at /var/lib/puppet/modules/openvpn/manifests/init.pp:19 So i guess I will just remove the subscribe and use a notify of exec restart as that one works :) Thanks! On Thu, Sep 23, 2010 at 8:18 AM, Felix Frank < felix.frank@alumni.tu-berlin.de> wrote:> On 09/23/2010 05:13 PM, Luc Suryo wrote: > > well here is the situation > > > > we have system that are vpn client and soem are vpn server however! we > have > > 2 that are both! > > > > what i want todo is taht IS there is a new client of server configuration > > (openvpn_client.conf or openvpn_server.conf) and teh new file is pushed I > > need the service tobe restarted (not reload! ) > > > > So being a novice in Puppet I wanted the service to depend on the config > > file being updated.. > > > > make sense ? > > > > In principle, yes. However, you have a conceptual mixup of "require" and > "subscribe". You are actually looking for the latter. > > Besides, subscribe has an implicit "or" semantics, in that subsribing to > several resources, an update to any of them will trigger the subscription. > > As "require" is only about ordering resources, it makes no sense to > define logical relations between multiple required resources. They will > all be handled before the one requiring them. > > HTH, > Felix > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Thu, Sep 23, 2010 at 8:43 AM, Luc Suryo <lsuryo@gmail.com> wrote:> Then would the service be define as this? > > service { "openvpn::base" : > name=> "openvpn", > ensure => running, > subscribe => [ File["openvpn_client.conf], > File["openvpn_server,conf]] > } > > so it a server includes the openvpn class it could have the client, or the > server or both config, > > in case of both that would work... but what if it is only a client or sever? > it errors with > > err: Could not run Puppet configuration client: Could not find dependency > File[openvpn_server.conf] for Service[openvpn::base] at > /var/lib/puppet/modules/openvpn/manifests/init.pp:19You should flip the relationship around and specify a "notify" in the two File resources, given that you don''t know which ones will be defined.> > So i guess I will just remove the subscribe and use a notify of exec restart > as that one works :) > > Thanks! > > > > > > On Thu, Sep 23, 2010 at 8:18 AM, Felix Frank > <felix.frank@alumni.tu-berlin.de> wrote: >> >> On 09/23/2010 05:13 PM, Luc Suryo wrote: >> > well here is the situation >> > >> > we have system that are vpn client and soem are vpn server however! we >> > have >> > 2 that are both! >> > >> > what i want todo is taht IS there is a new client of server >> > configuration >> > (openvpn_client.conf or openvpn_server.conf) and teh new file is pushed >> > I >> > need the service tobe restarted (not reload! ) >> > >> > So being a novice in Puppet I wanted the service to depend on the config >> > file being updated.. >> > >> > make sense ? >> > >> >> In principle, yes. However, you have a conceptual mixup of "require" and >> "subscribe". You are actually looking for the latter. >> >> Besides, subscribe has an implicit "or" semantics, in that subsribing to >> several resources, an update to any of them will trigger the subscription. >> >> As "require" is only about ordering resources, it makes no sense to >> define logical relations between multiple required resources. They will >> all be handled before the one requiring them. >> >> HTH, >> Felix >> >> -- >> 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+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > > > -- > -ls > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- nigel -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
sorry forget to mention that is what i done :) thank much for your time! On Thu, Sep 23, 2010 at 8:47 AM, Nigel Kersten <nigelk@google.com> wrote:> On Thu, Sep 23, 2010 at 8:43 AM, Luc Suryo <lsuryo@gmail.com> wrote: > > Then would the service be define as this? > > > > service { "openvpn::base" : > > name=> "openvpn", > > ensure => running, > > subscribe => [ File["openvpn_client.conf], > > File["openvpn_server,conf]] > > } > > > > so it a server includes the openvpn class it could have the client, or > the > > server or both config, > > > > in case of both that would work... but what if it is only a client or > sever? > > it errors with > > > > err: Could not run Puppet configuration client: Could not find dependency > > File[openvpn_server.conf] for Service[openvpn::base] at > > /var/lib/puppet/modules/openvpn/manifests/init.pp:19 > > You should flip the relationship around and specify a "notify" in the > two File resources, given that you don''t know which ones will be > defined. > > > > > > So i guess I will just remove the subscribe and use a notify of exec > restart > > as that one works :) > > > > Thanks! > > > > > > > > > > > > On Thu, Sep 23, 2010 at 8:18 AM, Felix Frank > > <felix.frank@alumni.tu-berlin.de> wrote: > >> > >> On 09/23/2010 05:13 PM, Luc Suryo wrote: > >> > well here is the situation > >> > > >> > we have system that are vpn client and soem are vpn server however! we > >> > have > >> > 2 that are both! > >> > > >> > what i want todo is taht IS there is a new client of server > >> > configuration > >> > (openvpn_client.conf or openvpn_server.conf) and teh new file is > pushed > >> > I > >> > need the service tobe restarted (not reload! ) > >> > > >> > So being a novice in Puppet I wanted the service to depend on the > config > >> > file being updated.. > >> > > >> > make sense ? > >> > > >> > >> In principle, yes. However, you have a conceptual mixup of "require" and > >> "subscribe". You are actually looking for the latter. > >> > >> Besides, subscribe has an implicit "or" semantics, in that subsribing to > >> several resources, an update to any of them will trigger the > subscription. > >> > >> As "require" is only about ordering resources, it makes no sense to > >> define logical relations between multiple required resources. They will > >> all be handled before the one requiring them. > >> > >> HTH, > >> Felix > >> > >> -- > >> 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > >> For more options, visit this group at > >> http://groups.google.com/group/puppet-users?hl=en. > >> > > > > > > > > -- > > -ls > > > > -- > > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > > For more options, visit this group at > > http://groups.google.com/group/puppet-users?hl=en. > > > > > > -- > nigel > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- -ls -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.