File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -941,16 +941,22 @@ def deploy(hubs, masterfiles):
941941
942942def agent (hosts , bootstrap = None ):
943943
944- command = "cf-agent"
945- if bootstrap :
946- command += " --bootstrap {}" .format (bootstrap )
944+ if len (bootstrap ) > 1 :
945+ user_error (
946+ "Cannot boostrap {} to {}. Cannot bootstrap to more than one host." .format (
947+ hosts , bootstrap
948+ )
949+ )
950+
951+ hub_host = bootstrap [0 ]
947952
948953 for host in hosts :
949954 data = get_info (host )
950955
951- if not data ["agent_version " ]:
956+ if not data ["agent_location " ]:
952957 user_error ("CFEngine not installed on {}" .format (host ))
953958
959+ command = "{} --bootstrap {}" .format (data ["agent_location" ], hub_host )
954960 output = run_command (host , command , sudo = True )
955961 if output :
956962 print (output )
You can’t perform that action at this time.
0 commit comments