diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-04-13 14:25:41 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-04-13 15:40:58 -0700 |
| commit | fc36e8de8cdf32ae13b9241f9a9eef4c2727056e (patch) | |
| tree | 3c977fddfcfe7dd074682d62d44e919f450c3769 /lib/puppet/application | |
| parent | a688461100150d3f4e102e669ece839f8571e14c (diff) | |
(#6928) Remove --parseonly
This has been removed in favor of 'puppet parser validate <manifest>'.
Paired-With: Jesse Wolfe
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/apply.rb | 23 | ||||
| -rw-r--r-- | lib/puppet/application/master.rb | 17 |
2 files changed, 10 insertions, 30 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index bf7b8a988..5779e799c 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -26,6 +26,11 @@ class Puppet::Application::Apply < Puppet::Application end end + option("--parseonly") do + puts "--parseonly has been removed. Please use 'puppet parser validate <manifest>'" + exit 1 + end + def help <<-HELP @@ -125,8 +130,6 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License def run_command if options[:catalog] apply - elsif Puppet[:parseonly] - parseonly else main end @@ -153,22 +156,6 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License configurer.run :catalog => catalog end - def parseonly - # Set our code or file to use. - if options[:code] or command_line.args.length == 0 - Puppet[:code] = options[:code] || STDIN.read - else - Puppet[:manifest] = command_line.args.shift - end - begin - Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types - rescue => detail - Puppet.err detail - exit 1 - end - exit 0 - end - def main # Set our code or file to use. if options[:code] or command_line.args.length == 0 diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb index f93894d99..a90829ae0 100644 --- a/lib/puppet/application/master.rb +++ b/lib/puppet/application/master.rb @@ -25,6 +25,11 @@ class Puppet::Application::Master < Puppet::Application end end + option("--parseonly") do + puts "--parseonly has been removed. Please use 'puppet parser validate <manifest>'" + exit 1 + end + def help <<-HELP @@ -125,8 +130,6 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License def run_command if options[:node] compile - elsif Puppet[:parseonly] - parseonly else main end @@ -148,16 +151,6 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License exit(0) end - def parseonly - begin - Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types - rescue => detail - Puppet.err detail - exit 1 - end - exit(0) - end - def main require 'etc' require 'puppet/file_serving/content' |
