Sha256: 5e3acff3e0bc3900acb381d546c8987b9eba63609c485941c8b0ec51685064aa

Contents?: true

Size: 1.32 KB

Versions: 2

Compression:

Stored size: 1.32 KB

Contents

# -*- encoding: utf-8 -*-
################################################################################
# puppet_modules.rake - Special tasks for the management of Puppet modules
# Time-stamp: <Thu 2014-08-28 23:04 svarrette>
#
# Copyright (c) 2014 Sebastien Varrette <Sebastien.Varrette@uni.lu>
#               http://varrette.gforge.uni.lu
################################################################################

require 'falkorlib'
require 'falkorlib/tasks'
require 'falkorlib/puppet'

#.....................
namespace :bootstrap do
	#.....................
	namespace :puppet do
		
		###########  bootstrap:puppet:module   ###########
		desc "Bootstrap a new Puppet module"
		task :module, [:name] do |t, args|
			info "#{t.comment}"
			name = args.name == 'name' ? ask("Enter the module name") : args.name 
			error "You need to provide a module name" unless name != ''
			error "The module name cannot contain spaces" if name =~ /\s+/
			moduledir = File.join( FalkorLib.config[:puppet][:modulesdir], name)
			dir = ask("Destination directory:", moduledir)
			error "The module '#{name}' already exists" if File.directory?(dir)
			FalkorLib::Puppet::Modules.init(dir)
		end 


	end # namespace bootstrap:puppet
end # namespace bootstrap



#.....................
namespace :puppet do
	include FalkorLib::Common


end # namespace puppet

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
falkorlib-0.3.3 lib/falkorlib/tasks/puppet_modules.rake
falkorlib-0.3.2 lib/falkorlib/tasks/puppet_modules.rake