[rudder-users] Class definition
Francois
francois.armand at normation.com
Tue Mar 25 12:00:43 CET 2014
On 25/03/2014 11:55, Chris wrote:
> On Tue, Mar 25, 2014 at 11:13:13AM +0100, Francois Armand wrote:
>> OK, I think I see what you want.
>> I fear that, as you said, you will have to build that logic
>> intra-technique, and it's typically what we do for restarting a service
>> when it's config file changed (for ex., see the openssh server
>> technique). And has technique are (or should be/were thought to be)
>> closed components, independant from each others, building cooperation
>> between them is for now ad-hoc, and can be fragile.
>>
>> But I believe I can help you nonetheless. As we thought that kind of
>> things should be simple and built-in, we start ncf ( http://www.ncf.io/
>> ), an abstraction, component-based framework based on CFEngine, and it
>> is (starting to) be integrated with Rudder.
>>
>> With ncf, you can do something like that:
>>
>> bundle agent ntp {
>> methods:
>> "package" usebundle => package_install("ntp");
>> "config" usebundle => file_from_template("ntp.conf", "/etc/ntp.conf");
>> "reload" usebundle => service_restart("ntp"),
>> ifvarclass => "file_from_template__etc_ntp_conf_repaired";
>> "running" usebundle => service_ensure_running("ntp");
>> }
>>
>>
>> the class "file_from_template__etc_ntp_conf_repaired" if named by
>> concention and automatically raised by "file_from_template" when needed.
>>
>> Is this that kind of thing you want ?
>>
> It looks similar, but I would have to better understand how it works before I could
> say for sure. I just noticed the ncf project earlier today when I signed into
> redmine to open the ticket. It really looks quite interesting. I will
> definitely have to take a closer look at it.
Great!
--
Francois
More information about the rudder-users
mailing list