forked from ungleich-public/cdist
		
	transfer explorer
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								d0eeafd228
							
						
					
				
			
			
				commit
				
					
						ef925714d5
					
				
			
		
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -45,7 +45,7 @@ def run_or_fail(*args):
 | 
				
			||||||
      exit_error("Command failed:", newargs)
 | 
					      exit_error("Command failed:", newargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def remote_run_or_fail(hostname, *args):
 | 
					def remote_run_or_fail(hostname, *args):
 | 
				
			||||||
   newargs = ["ssh", hostname]
 | 
					   newargs = ["ssh", "root@" + hostname]
 | 
				
			||||||
   newargs.extend(*args)
 | 
					   newargs.extend(*args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   run_or_fail(newargs)
 | 
					   run_or_fail(newargs)
 | 
				
			||||||
| 
						 | 
					@ -55,7 +55,7 @@ def remove_remote_dir(hostname, destination):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def transfer_dir(hostname, source, destination):
 | 
					def transfer_dir(hostname, source, destination):
 | 
				
			||||||
   remove_remote_dir(hostname, destination)
 | 
					   remove_remote_dir(hostname, destination)
 | 
				
			||||||
   run_or_fail(["scp", "-r", source, hostname + ":" + destination])
 | 
					   run_or_fail(["scp", "-r", source, "root@" + hostname + ":" + destination])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def base_directory():
 | 
					def base_directory():
 | 
				
			||||||
   """Returns the directory in which all cdist stuff is based in"""
 | 
					   """Returns the directory in which all cdist stuff is based in"""
 | 
				
			||||||
| 
						 | 
					@ -95,6 +95,8 @@ def global_explore(hostname):
 | 
				
			||||||
   if(len(explorer) == 0):
 | 
					   if(len(explorer) == 0):
 | 
				
			||||||
      exit_error("No explorers found in", global_explorer_directory())
 | 
					      exit_error("No explorers found in", global_explorer_directory())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   transfer_global_explorers(hostname)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def init_deploy(hostname):
 | 
					def init_deploy(hostname):
 | 
				
			||||||
   logger("info", "Creating clean directory structure")
 | 
					   logger("info", "Creating clean directory structure")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue