Forum: CFEngine Help
Subject: Re: copy_from symbolic links with link_type=none
Author: nickanderson
Link to topic: https://cfengine.com/forum/read.php?3,26584,26585#msg-26585

It sounds  an awful lot like something you could use files_single_copy for and 
then avoid the symlinks.

https://cfengine.com/manuals/cf3-Reference#files_005fsingle_005fcopy-in-agent
Note: the example is incorrect right now, it should be files_single_copy not 
single_copy

It would look something like this in your policy.


bundle agent single_copy_example{
vars:
        "suffixes"
            slist   => { ".$(sys.fqhost)", "" },
            comment => "List in order of most specific to least specific
                        for files we want to copy";

files:
        "/etc/sudoers"
            copy_from => secure_cp("/my/file/store/etc/sudoers$(suffixes)"), 
"$(sys.policy_hub)"),
            comment => "Copy sudoers.hostname if it doesnt exist, copy sudoers 
(wihout suffix), aka single copy nirvana";


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

Reply via email to