known_hosts
This commit is contained in:
parent
789897acf6
commit
49b05fe8b8
2 changed files with 18 additions and 8 deletions
10
hooks/known_hosts.py
Normal file
10
hooks/known_hosts.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from os.path import expanduser
|
||||
|
||||
|
||||
def apply_start(repo, target, nodes, interactive=False, **kwargs):
|
||||
with open(expanduser('~/.ssh/known_hosts_ckn'), 'w+') as file:
|
||||
file.write('\n'.join(sorted(
|
||||
repo.libs.ssh.known_hosts_entry_for(node)
|
||||
for node in repo.nodes
|
||||
if node.has_bundle('ssh')
|
||||
)))
|
Loading…
Reference in a new issue