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? -- SY, Seva Gluschenko _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine