From d39630e98fcaf7f3527255bece909b8f3e452e59 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 16 Apr 2024 09:45:21 +0200 Subject: [PATCH] Added hosts --- automateRsync.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/automateRsync.py b/automateRsync.py index a43bcdd..4143112 100644 --- a/automateRsync.py +++ b/automateRsync.py @@ -1,3 +1,4 @@ +#/usr/bin/python3 import os def rsyncConection(src, dest, user, host): @@ -6,8 +7,9 @@ def rsyncConection(src, dest, user, host): os.system(conn) if __name__ == "__main__": - src = "test.txt" - dest = "/home/userpi/" - user = "userpi" - host = "victor.raspberrypi" - rsyncConection(src, dest, user, host) \ No newline at end of file + src = "/etc/rsyslog.conf" + dest = "/etc/rsyslog.conf" + user = "splunk" + hosts = ["10.218.7.217", "10.218.7.218", "10.218.7.219"] + for host in hosts: + rsyncConection(src, dest, user, host) \ No newline at end of file