On 05/22/2012 02:23 PM, Ted Zlatanov wrote: > You want "prefixVAR" instead of "prefix[VAR]". In other words, we're > passing a namespace prefix, not an array name, so all your variables are > named "main.repoVAR" (assuming you pass the prefix like that, although I > think "main.repo_" would be a more legible prefix).
OH, I see. So in general are you preferring prefix to passing an array name with new sketches? And also are you preferring a single usebundle call for each different configuration? I try to error on the side of defaults. With regard to file distribution the default bootstrap policy wont copy .template files iirc only .cf .dat and .txt files are copied by default. I have been shiming in a copy_from promise into a lot of my sketches like my upgrade_cfengine_3_3_0_rpm sketch (https://github.com/nickanderson/design-center/blob/feature_upgrade_cfengine_3_3_0_rpm/policy_examples/upgrade_cfengine_3_3_0_rpm/upgrade_cfengine_3_3_0_rpm.cf) with some configurable refresh period to refresh from the policyhub. Its either that or inline stuff. Obviously nothing wrong with changing the defaults or having instructions how to do so within the sketch documentation but I am curious as to what you and others think the accepted norm should be for the design center. On a side note I suggest another rename, perhaps to vcs_freshenup or vcs_cleanup. clone terminology doesn't really apply to svn well. freshenup or cleanup is pretty generic. I saw the same behavior listed in bug 718 when I tried to get the bundle home automatically as well. Otherwise it seemed to work as expected. bundle agent main { vars: "repos" slist => { "nicks_copbl" }; "nicks_copbl_vcs" string => "/usr/bin/git"; "nicks_copbl_path" string => "/tmp/test2/test3/git_freshclone"; "nicks_copbl_origin" string => "git://github.com/nickanderson/copbl.git"; "nicks_copbl_branch" string => "master"; "nicks_copbl_bundle_home" string => "/home/cmdln/.cfagent/inputs/sketches/vcs_freshclone"; # TODO: provide some way to selectivly contain the executing user methods: "any" usebundle => vcs_freshclone("main.$(repos)_"); } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine