Reputation: 7441
I have the following Fabric task:
def ssh_keygen(user, dir):
env.user = user
run("ssh-keygen %s" % dir)
I want to call it using "execute" but need to pass the task an argument. i.e. user and dir
execute(ssh_keygen('jbloggs', '/home/jbloggs'), hosts=["server1"])
However this does not work:
No hosts found. Please specify (single) host string for connection: Traceback (most recent
Is there anyway to achieve this?
Upvotes: 13
Views: 7348