Added hosts
This commit is contained in:
@@ -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"]
|
||||||
rsyncConection(src, dest, user, host)
|
for host in hosts:
|
||||||
|
rsyncConection(src, dest, user, host)
|
||||||
Reference in New Issue
Block a user