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 <kc7...@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 <j...@puppetlabs.com> wrote:
>
>> On Wed, Sep 22, 2010 at 5:55 PM, Luc Suryo <lsu...@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-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@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-us...@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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@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-us...@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.

Reply via email to