Rex

file für Datei hochladen s. nächster Link: http://search.cpan.org/~jfried/Rex-0.43.5/lib/Rex/Commands/File.pm

http://www.rexify.org/api/Rex/Commands/File.pm.html

http://www.rexify.org/api/Rex/Commands/Fs.pm.html

http://wiki.ubuntuusers.de/SSH

ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa user@server

# Test für Warnung in der Ausgabe
Rex::Logger::info("TEST-WARNUNG", "warn");
# User mit sudo-Rechten und dessen ssh-Keys
user "user";
private_key "/home/local_user/.ssh/id_rsa";
public_key "/home/local_user/.ssh/id_rsa.pub";
auth_key;
# Alles mit sudo-Rechten ausführen
sudo_password "test123";
sudo TRUE;
group clients => "berny";
task "upload", group => "clients", sub {
say "Kopiere my_testfile auf Clients";
# file "</remote_path/upload_file>", source => "</local_path/to/upload_file>";
file "/etc/my_testfile",
source => "my_testfile";
};
task "mkdir", group => "clients", sub {
say "mkdir testdir";
mkdir( "/home/user/testdir" );
};