lib/vagrant-orchestrate/command/init.rb in vagrant-orchestrate-0.0.2 vs lib/vagrant-orchestrate/command/init.rb in vagrant-orchestrate-0.0.3

- old
+ new

@@ -46,11 +46,11 @@ o.on("--shell-inline command", String, "Inline script to run. Only with --shell") do |c| options[:shell_inline] = c end - o.on("--puppet", "Shorthand for --provisioner-with=puppet") do + o.on("--puppet", "Shorthand for '--provision-with puppet'") do options[:provisioners] << "puppet" end o.on("--puppet-hiera", "Include templates for hiera. Only with --puppet") do |p| options[:puppet_hiera] = p @@ -105,14 +105,12 @@ options[:puppet_librarian_puppet] ||= true if options[:puppet_librarian_puppet] contents = TemplateRenderer.render(Orchestrate.source_root.join("templates/puppet/Puppetfile")) write_file "Puppetfile", contents, options FileUtils.mkdir_p(File.join(@env.cwd, "modules")) - contents = "# This is a placeholder file to keep the modules directory around." - write_file(File.join(@env.cwd, "modules", ".PLACEHOLDER"), contents, options) + write_file(File.join(@env.cwd, "modules", ".gitignore"), "*", options) options[:plugins] << "vagrant-librarian-puppet" - @env.ui.info(I18n.t("vagrant_orchestrate.librarian_puppet.gitignore"), prefix: false) end options[:puppet_hiera] ||= true if options[:puppet_hiera] contents = TemplateRenderer.render(Orchestrate.source_root.join("templates/puppet/hiera.yaml")) @@ -149,10 +147,11 @@ ssh_private_key_path: options[:ssh_private_key_path], servers: options[:servers], plugins: options[:plugins] ) write_file("Vagrantfile", contents, options) - + FileUtils.cp(Orchestrate.source_root.join("templates", "vagrant", "dummy.box"), + File.join(@env.cwd, "dummy.box")) @env.ui.info(I18n.t("vagrant.commands.init.success"), prefix: false) # Success, exit status 0 0 end