Added hosts
This commit is contained in:
@@ -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)
|
||||
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)
|
||||
Reference in New Issue
Block a user