Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added a modulepath option where the created files will be stored. Thi…

…s is useful for using puppet standalone with a local module directory

'
  • Loading branch information...
commit 1dbf249001c37de8b1b4786b148741122ee479bc 1 parent 2e8b1bf
Patrick Debois jedi4ever authored committed
Showing with 10 additions and 1 deletion.
  1. +10 −1 bin/scaffold
11 bin/scaffold
View
@@ -27,6 +27,11 @@ optparse = OptionParser.new do |opts|
options[:template] = template
end
+ options[:modulepath] = nil
+ opts.on( '-m', '--modulepath=DIRECTORY', 'Location to store the files created') do |modulepath|
+ options[:modulepath] = File.expand_path(modulepath)
+ end
+
opts.separator ""
opts.separator "Common options:"
@@ -65,7 +70,11 @@ if options[:template] == 'puppet'
dir = Puppet[:confdir]
end
else
- dir = Puppet[:modulepath].split(':')
+ if options[:modulepath]
+ dir = options[:modulepath]
+ else
+ dir = Puppet[:modulepath].split(':')
+ end
end
# Add generator name to ARGV
Please sign in to comment.
Something went wrong with that request. Please try again.