Hi All,

Just to let anyone else with the same problem know, I found the
solution. It's not exactly trivial if you're not used to regular
expressions, but if you are, it's not so hard. ;)

Again, I want to distribute all the id_dsa, id_dsa.pub and
authorized_keys files from one host to another. Creating non-existent
user directories is fine, as users are mirrored too. I just don't want
to copy the entire contents of users directories.

To achieve this, use:

control:
    actionsequence = ( copy )

filters:
    { dotssh
        NameRegex:
"/home/[^/]*(/\.ssh(/authorized_keys|/id_dsa|/id_dsa.pub)?)?"
        Result: "NameRegex"
    }

copy:
    /home:
        r=inf
        filter=dotssh
        dest=/home
        server=yourmasterserver

I hope it helps someone out there with a similar problem. :)

Regard,
Paga

--
Daily (or almost) Debian package:
http://www.paganini.net/index.cgi/dailydebian

_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to