Hi All, I have an interesting problem here, and I'm wondering what would be the best way to solve it using cfengine.
Let's say I have three users "joe, moe, curly". These users have their homes under /home (/home/joe, /home/moe and /home/curly). Each user has a ".ssh" directory inside their homes with the SSH private and public keys, authorized_keys file, etc. I want to copy these directories to other servers on the network. The obvious brute force approach is: copy: /home/moe/.ssh dest=/home/moe/.ssh server=mymaster /home/joe/.ssh dest=/home/joe/.ssh server=mymaster /home/curly/.ssh dest=/home/curly/.ssh server=mymaster This works, but I'd like something more "automated". Adding a user and a home directory alone should not require changes in the cfagent.conf file... I then tried using iterations, but cfengine does not allow iterations to be used in the 'dest=' part of the copy action, making it rather useless for this case. :\ I also tried to copy the .ssh directories using recursive copy, but: 1) I cannot use exclude, as it only works on files, not directories 2) Ignore does not work well in this case, as I'd have to ignore everything else *except* these users, and all directories under their homes would be copied as well (I only want .ssh) 3) I tried some black magic using shell substitutions, but it did not work so well. I can't believe something so simple is impossible or that hard to do with cfengine... Any ideas? Regards, Paga _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine