On Thu, Sep 23, 2010 at 8:43 AM, Luc Suryo <[email protected]> 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
> <[email protected]> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to