summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application/apply.rb23
-rw-r--r--lib/puppet/application/master.rb17
-rw-r--r--lib/puppet/defaults.rb1
-rw-r--r--lib/puppet/faces/help/action.erb3
-rw-r--r--lib/puppet/faces/help/face.erb7
-rw-r--r--lib/puppet/faces/help/global.erb20
-rw-r--r--lib/puppet/parser/grammar.ra6
-rw-r--r--lib/puppet/parser/parser.rb6
8 files changed, 46 insertions, 37 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'
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 89f3e169d..680762b94 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -418,7 +418,6 @@ module Puppet
:desc => "Where the puppet master web server logs."
},
:masterport => [8140, "Which port puppet master listens on."],
- :parseonly => [false, "Just check the syntax of the manifests."],
:node_name => ["cert", "How the puppetmaster determines the client's identity
and sets the 'hostname', 'fqdn' and 'domain' facts for use in the manifest,
in particular for determining which 'node' statement applies to the client.
diff --git a/lib/puppet/faces/help/action.erb b/lib/puppet/faces/help/action.erb
new file mode 100644
index 000000000..eaf131464
--- /dev/null
+++ b/lib/puppet/faces/help/action.erb
@@ -0,0 +1,3 @@
+Use: puppet <%= face.name %> [options] <%= action.name %> [options]
+
+Summary: <%= action.summary %>
diff --git a/lib/puppet/faces/help/face.erb b/lib/puppet/faces/help/face.erb
new file mode 100644
index 000000000..efe5fd809
--- /dev/null
+++ b/lib/puppet/faces/help/face.erb
@@ -0,0 +1,7 @@
+Use: puppet <%= face.name %> [options] <action> [options]
+
+Available actions:
+% face.actions.each do |actionname|
+% action = face.get_action(actionname)
+ <%= action.name.to_s.ljust(16) %> <%= action.summary %>
+% end
diff --git a/lib/puppet/faces/help/global.erb b/lib/puppet/faces/help/global.erb
new file mode 100644
index 000000000..e123367a2
--- /dev/null
+++ b/lib/puppet/faces/help/global.erb
@@ -0,0 +1,20 @@
+puppet <subcommand> [options] <action> [options]
+
+Available subcommands, from Puppet Faces:
+% Puppet::Faces.faces.sort.each do |name|
+% face = Puppet::Faces[name, :current]
+ <%= face.name.to_s.ljust(16) %> <%= face.summary %>
+% end
+
+% unless legacy_applications.empty? then # great victory when this is true!
+Available applications, soon to be ported to Faces:
+% legacy_applications.each do |appname|
+% summary = horribly_extract_summary_from appname
+ <%= appname.to_s.ljust(16) %> <%= summary %>
+% end
+% end
+
+See 'puppet help <subcommand> <action>' for help on a specific subcommand action.
+See 'puppet help <subcommand>' for help on a specific subcommand.
+See 'puppet man <subcommand>' for the full man page.
+Puppet v<%= Puppet::PUPPETVERSION %>
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra
index 8339c51b7..d2bd06e94 100644
--- a/lib/puppet/parser/grammar.ra
+++ b/lib/puppet/parser/grammar.ra
@@ -156,7 +156,7 @@ resourceoverride: resourceref LBRACE anyparams endcomma RBRACE {
virtualresource: at resource {
type = val[0]
- if (type == :exported and ! Puppet[:storeconfigs]) and ! Puppet[:parseonly]
+ if (type == :exported and ! Puppet[:storeconfigs])
Puppet.warning addcontext("You cannot collect without storeconfigs being set")
end
@@ -188,7 +188,7 @@ collection: classref collectrhand LBRACE anyparams endcomma RBRACE {
else
args[:form] = val[1]
end
- if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
+ if args[:form] == :exported and ! Puppet[:storeconfigs]
Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
args[:override] = val[3]
@@ -208,7 +208,7 @@ collection: classref collectrhand LBRACE anyparams endcomma RBRACE {
else
args[:form] = val[1]
end
- if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
+ if args[:form] == :exported and ! Puppet[:storeconfigs]
Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
result = ast AST::Collection, args
diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb
index 300ddddd6..611398d14 100644
--- a/lib/puppet/parser/parser.rb
+++ b/lib/puppet/parser/parser.rb
@@ -1366,7 +1366,7 @@ module_eval(<<'.,.,', 'grammar.ra', 156)
def _reduce_50(val, _values, result)
type = val[0]
- if (type == :exported and ! Puppet[:storeconfigs]) and ! Puppet[:parseonly]
+ if (type == :exported and ! Puppet[:storeconfigs])
Puppet.warning addcontext("You cannot collect without storeconfigs being set")
end
@@ -1411,7 +1411,7 @@ module_eval(<<'.,.,', 'grammar.ra', 178)
else
args[:form] = val[1]
end
- if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
+ if args[:form] == :exported and ! Puppet[:storeconfigs]
Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
args[:override] = val[3]
@@ -1436,7 +1436,7 @@ module_eval(<<'.,.,', 'grammar.ra', 197)
else
args[:form] = val[1]
end
- if args[:form] == :exported and ! Puppet[:storeconfigs] and ! Puppet[:parseonly]
+ if args[:form] == :exported and ! Puppet[:storeconfigs]
Puppet.warning addcontext("You cannot collect exported resources without storeconfigs being set; the collection will be ignored")
end
result = ast AST::Collection, args