Seva,

I don't understand your question. All the tools you ask for are present, but 
what are you
trying to do? What pattern are you referring to?

M

Сева Глущенко wrote:
> Hello guys,
> 
> I'm new to this list and new to the cfengine either. Working out ways
> to deploy the community version, I'm getting stuck with limitations
> sourced by "classes not variables" paradigm. For example, currently I
> have such a case for a mailserver controls:
> 
> bundle agent mailmaps
> {
>  vars:
>         "conf_path" string  => "/etc/mail";
>         "db_cfg"      slist     => { "access", "virtuser" };
> 
>  files:
>   "$(conf_path)/$(db_cfg)"
>         copy_from       => my_scp("$(g.conf_path)/$(db_cfg)"),
>         classes         => if_repaired("$(db_cfg)_updated"),
>         perms           => mog("0400","mail","root"),
>         comment         => "Set up mail server configuration item";
> 
>  commands:
>     access_updated::
>         "/usr/bin/makemap hash < $(conf_path)/access > $(conf_path)/access.db"
>                 useshell        => "true",
>                 comment       => "Rebuild access database";
> 
>     virtuser_updated::
>         "/usr/bin/makemap hash < $(conf_path)/virtuser >
> $(conf_path)/virtuser.db"
>                 useshell        => "true",
>                 comment       => "Rebuild virtuser database";
> }
> 
> Is there any good method to eliminate repeated patterns in commands
> section and use some template or iteration?
> 

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to