Created
June 6, 2013 19:58
-
-
Save shofetim/5724436 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import salt.client | |
| import os | |
| client = salt.client.LocalClient() | |
| ret = client.cmd("*", "network.ip_addrs") | |
| ips = set(reduce(lambda x, y: x+y, ret.values())) | |
| cmd = "ssh-keyscan " | |
| for ip in ips: | |
| cmd += ip + " " | |
| os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment