Sha256: 1e8109cc353621f314e63987eaaf283eed306314a531223538e46a6f967279f8
Contents?: true
Size: 517 Bytes
Versions: 71
Compression:
Stored size: 517 Bytes
Contents
require 'fileutils' class Subspace::Commands::Override < Subspace::Commands::Base def initialize(args, options) @role = args.first run end def run role_src = File.join gem_path, "ansible", "roles", @role if !File.exist? role_src say "Error, no such role #{@role}" exit end dest = File.join dest_dir, 'roles', @role if File.exist? dest say "Error, cowardly refusing to overwrite #{dest} - file exists" exit end FileUtils.cp_r role_src, dest end end
Version data entries
71 entries across 71 versions & 1 rubygems