It is said that the class "reload_sshd" will be defined, if 
/repository/cf3/etc/ssh/ssh_config is copied to /etc/ssh/sshd_config or its 
permission is changed to 600

To test it out, you may add a comment to /repository/cf3/etc/ssh/ssh_config or 
change the permission to something else then rerun cf-agent.

Cheers,
--Nakarin

On Jan 14, 2010, at 10:17 PM, Simeon Zaharici wrote:

> I must be misunderstanding something somewhere because it is still not 
> working.
> I included  cfengine_stdlib.cf and changed to classes line to 
> classes => if_repaired("reload_sshd");
> now it is accepting the syntax and executing the copy, however reload_ssh is 
> never defined
> I get :
> "Skipping whole next promise (/etc/init.d/sshd reload), as var-context 
> reload_sshd is not relevant'
> 
> Thanks
> 
> --- On Fri, 1/15/10, Simeon Zaharici <simeon_zahar...@yahoo.com> wrote:
> 
> From: Simeon Zaharici <simeon_zahar...@yahoo..com>
> Subject: Re: cfengine3 copy+action
> To: "Mark Burgess" <mark.burg...@iu.hio.no>
> Cc: help-cfengine@cfengine.org
> Received: Friday, January 15, 2010, 12:49 AM
> 
> Thanks, I just assumed that define was an built-in function
> 
> --- On Fri, 1/15/10, Mark Burgess <mark.burg...@iu.hio.no> wrote:
> 
> 
> You are on the right track, you just need to define "define()".
> The define() is a body template, not an inbuilt function. Take a look at this
> 
> http://www.cfengine.org/manuals/cf3-solutions.html
> 
> for a standard set of these and lots of examples. If you use this new 
> standard, you can
> replace define() with if_repaired(), and just include the standard 
> definitions.
> 
> Good luck. See also the upgrade guide 
> http://www.cfengine.org/cftimes/articles/0000000020.html
> 
> M
> 
> Simeon Zaharici wrote:
> > Hi
> > 
> > I am long time user of cfengine2 and just started playing with cfengine3
> > ( cfengine-3.0.3). What I am trying to accomplish is extremely simple,
> > copy a file and then do an action if the file is copied over.
> > I put up a simple config based on Neil Watson's tutorial and tried
> > adding these lines to promises.cf
> > 
> > body common control {
> >            bundlesequence => {
> >            .......................................
> >             "copyfiles"
> > };
> > bundle agent copyfiles
> > {
> > 
> > files:
> > "/etc/ssh/sshd_config"
> > perms => usystem("0600"),
> > copy_from => umycopy("/repository/cf3/etc/ssh/ssh_config"),
> > classes => define("reload_sshd");
> > 
> > commands:
> > "/etc/init.d/sshd reload"
> > comment => 'reload sshd',
> > ifvarclass => "reload_sshd";
> > 
> > }
> > 
> > If i try to run this I get :  
> > No such FnCall "define()" in promise @ /var/cfengine/inputs/promises.cf
> > near line 72
> > 
> > What is the proper way of defining a class in cfengine 3 ? 
> > 
> > Thanks for you support
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > Make your browsing faster, safer, and easier with the new Internet
> > Explorer® 8. Optimized for Yahoo! *Get it Now for Free! *
> > <http://downloads.yahoo.com/ca/internetexplorer/>
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@cfengine.org
> > https://cfengine.org/mailman/listinfo/help-cfengine
> 
> -- 
> Mark Burgess
> 
> -------------------------------------------------
> Professor of Network and System Administration
> Oslo University College, Norway
> 
> Personal Web: http://www.iu.hio.no/~mark
> Office Telf : +47 22453272
> -------------------------------------------------
> 
> Make your browsing faster, safer, and easier with the new Internet Explorer® 
> 8.. Optimized for Yahoo! Get it Now for Free!
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
> 
> Reclaim your name @ymail.com or @rocketmail.com. Get your new email address 
> now!_______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to