Skip to content

Instantly share code, notes, and snippets.

@DavidWittman
Created June 21, 2012 00:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DavidWittman/2963087 to your computer and use it in GitHub Desktop.
Save DavidWittman/2963087 to your computer and use it in GitHub Desktop.
Lsyncd alternate SSH key
settings = {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd-status.log",
statusInterval = 20
}
servers = {
"web02",
"web03"
}
for _, server in ipairs(servers) do
sync {
default.rsync,
source="/var/www/",
target=server..":/var/www/",
rsyncOpts={"-e", "/usr/bin/ssh -i /root/.ssh/other_id_rsa -o StrictHostKeyChecking=no", "-avz"}
}
sync {
default.rsync,
source="/etc/apache2/",
target=server..":/etc/apache2/",
rsyncOpts={"-e", "/usr/bin/ssh -i /root/.ssh/other_id_rsa -o StrictHostKeyChecking=no", "-avz"}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment