forked from ungleich-public/cdist
		
	use cdist-dir to push results to target
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								6460f1914d
							
						
					
				
			
			
				commit
				
					
						65e84f4b4b
					
				
			
		
					 2 changed files with 5 additions and 39 deletions
				
			
		| 
						 | 
					@ -58,7 +58,11 @@ cdist-object-explorer-all     "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
				
			||||||
# Generate code for all objects
 | 
					# Generate code for all objects
 | 
				
			||||||
cdist-object-codegen-all      "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
					cdist-object-codegen-all      "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Transfer all objects including code
 | 
				
			||||||
 | 
					cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \
 | 
				
			||||||
 | 
					   "${__cdist_remote_out_object_base_dir}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit 2
 | 
					exit 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cdist-exec-transfer           "$__cdist_target_host" "$__cdist_out_execs"
 | 
					
 | 
				
			||||||
cdist-exec-run                "$__cdist_target_host"
 | 
					cdist-exec-run                "$__cdist_target_host"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,38 +0,0 @@
 | 
				
			||||||
#!/bin/sh
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org)
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# This file is part of cdist.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# cdist is free software: you can redistribute it and/or modify
 | 
					 | 
				
			||||||
# it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
# the Free Software Foundation, either version 3 of the License, or
 | 
					 | 
				
			||||||
# (at your option) any later version.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# cdist is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
# GNU General Public License for more details.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# Transfer executables
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
. cdist-config
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[ $# -eq 2 ] || __cdist_usage "<target host> <exec_dir>"
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export __cdist_target_host="$1"; shift
 | 
					 | 
				
			||||||
export __cdist_exec_dir="$1"; shift
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# re-create basedir so it's clean
 | 
					 | 
				
			||||||
ssh "root@${__cdist_target_host}" "rm -rf \"${__cdist_remote_cache_exec}\" && mkdir -p \"${__cdist_remote_cache_exec}\""
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# FIXME: enable -q as soon as the code is cleaned up
 | 
					 | 
				
			||||||
scp -r "${__cdist_exec_dir}"/* \
 | 
					 | 
				
			||||||
       "root@${__cdist_target_host}:${__cdist_remote_cache_exec}"
 | 
					 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue