Hello everybody,
I want to managing some configuration files of my system.
For example the file sshd_conf. I want to edit the line
"PermitRootLoging yes". In this line there has to be no comment - no #
sign.
I think i should use the bundle "edit_line
uncomment_lines_matching(regex,comment)", but it doesn't work for me.
My created file for this job is this:

bundle sshd_conf {

files:
        "/tmp/sshd_conf"

edit_line => AppendOrReplaceLineMatching("PermitRootLogin yes");

}

bundle edit_line uncomment_lines_matching(regex,comment)

 # Uncomment lines of a file where the regex matches
 # the text after the comment string

{
replace_patterns:

 "$(comment)($(regex))$" replace_with => uncomment;
}



It would be very nice if some of you has a promise like that.


Thanks in advance

-- 
Christian Seifert

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

Reply via email to