Added hosts

This commit is contained in:
victor
2024-04-16 09:45:21 +02:00
parent ef13a6049e
commit d39630e98f

View File

@@ -1,3 +1,4 @@
#/usr/bin/python3
import os import os
def rsyncConection(src, dest, user, host): def rsyncConection(src, dest, user, host):
@@ -6,8 +7,9 @@ def rsyncConection(src, dest, user, host):
os.system(conn) os.system(conn)
if __name__ == "__main__": if __name__ == "__main__":
src = "test.txt" src = "/etc/rsyslog.conf"
dest = "/home/userpi/" dest = "/etc/rsyslog.conf"
user = "userpi" user = "splunk"
host = "victor.raspberrypi" hosts = ["10.218.7.217", "10.218.7.218", "10.218.7.219"]
for host in hosts:
rsyncConection(src, dest, user, host) rsyncConection(src, dest, user, host)