diff --git a/lib/puppet/face/catalog.rb b/lib/puppet/face/catalog.rb index c7501ff37..13351540a 100644 --- a/lib/puppet/face/catalog.rb +++ b/lib/puppet/face/catalog.rb @@ -1,127 +1,116 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:catalog, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Compile, save, view, and convert catalogs." description <<-'EOT' This face primarily interacts with the compiling subsystem. By default, it compiles a catalog using the default manifest and the hostname from `certname`, but you can choose to retrieve a catalog from the server by specifying '--terminus rest'. You can also choose to print any catalog in 'dot' format (for easy graph viewing with OmniGraffle or Graphviz) with '--render-as dot'. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `active_record` - * `compiler` - * `queue` - * `rest` - * `yaml` - EOT get_action(:destroy).summary "Invalid for this face." get_action(:search).summary "Query format unknown; potentially invalid for this face." action(:apply) do summary "Apply a Puppet::Resource::Catalog object." description <<-'EOT' Finds and applies a catalog. This action takes no arguments, but the source of the catalog can be managed with the --terminus option. EOT returns <<-'EOT' A Puppet::Transaction::Report object. EOT examples <<-'EOT' Apply the locally cached catalog: $ puppet catalog apply --terminus yaml Retrieve a catalog from the master and apply it, in one step: $ puppet catalog apply --terminus rest From `secret_agent.rb` (API example): # ... Puppet::Face[:catalog, '0.0.1'].download # (Termini are singletons; catalog.download has a side effect of # setting the catalog terminus to yaml) report = Puppet::Face[:catalog, '0.0.1'].apply # ... EOT when_invoked do |options| catalog = Puppet::Face[:catalog, "0.0.1"].find(Puppet[:certname]) or raise "Could not find catalog for #{Puppet[:certname]}" catalog = catalog.to_ral report = Puppet::Transaction::Report.new("apply") report.configuration_version = catalog.version Puppet::Util::Log.newdestination(report) begin benchmark(:notice, "Finished catalog run") do catalog.apply(:report => report) end rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Failed to apply catalog: #{detail}" end report.finalize_report report end end action(:download) do summary "Download this node's catalog from the puppet master server." description <<-'EOT' Retrieves a catalog from the puppet master and saves it to the local yaml cache. The saved catalog can be used in subsequent catalog actions by specifying '--terminus rest'. This action always contacts the puppet master and will ignore alternate termini. EOT returns "Nothing." notes <<-'EOT' As termini are singletons, this action has a side effect of exporting Puppet::Resource::Catalog.indirection.terminus_class = yaml to the calling context when used with the Ruby Faces API. The terminus must be explicitly re-set for subsequent catalog actions. EOT examples <<-'EOT' Retrieve and store a catalog: $ puppet catalog download From `secret_agent.rb` (API example): Puppet::Face[:plugin, '0.0.1'].download Puppet::Face[:facts, '0.0.1'].upload Puppet::Face[:catalog, '0.0.1'].download # ... EOT when_invoked do |options| Puppet::Resource::Catalog.indirection.terminus_class = :rest Puppet::Resource::Catalog.indirection.cache_class = nil catalog = nil retrieval_duration = thinmark do catalog = Puppet::Face[:catalog, '0.0.1'].find(Puppet[:certname]) end catalog.retrieval_duration = retrieval_duration catalog.write_class_file Puppet::Resource::Catalog.indirection.terminus_class = :yaml Puppet::Face[:catalog, "0.0.1"].save(catalog) Puppet.notice "Saved catalog for #{Puppet[:certname]} to yaml" nil end end end diff --git a/lib/puppet/face/certificate.rb b/lib/puppet/face/certificate.rb index d77525ba8..cab8817e3 100644 --- a/lib/puppet/face/certificate.rb +++ b/lib/puppet/face/certificate.rb @@ -1,120 +1,111 @@ require 'puppet/indirector/face' require 'puppet/ssl/host' Puppet::Indirector::Face.define(:certificate, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Provide access to the CA for certificate management" description <<-'EOT' This face interacts with a local or remote Puppet certificate authority. Currently, its behavior is not a full superset of `puppet cert`; specifically, it is unable to mimic puppet cert's "clean" option, and its "generate" action submits a CSR rather than creating a signed certificate. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `ca` - * `file` - * `rest` - EOT option "--ca-location LOCATION" do summary "The certificate authority to query" description <<-'EOT' Whether to act on the local certificate authority or one provided by a remote puppet master. Allowed values are 'local' and 'remote.' EOT before_action do |action, args, options| Puppet::SSL::Host.ca_location = options[:ca_location].to_sym end end action :generate do summary "Generate a new certificate signing request for HOST." arguments "" returns "Nothing." description <<-'EOT' Generates and submits a certificate signing request (CSR) for the specified host. This CSR will then have to be signed by a user with the proper authorization on the certificate authority. Puppet agent usually handles CSR submission automatically. This action is primarily useful for requesting certificates for individual users and external applications. EOT examples <<-'EOT' Request a certificate for "somenode" from the site's CA: $ puppet certificate generate somenode.puppetlabs.lan --ca-location remote EOT when_invoked do |name, options| host = Puppet::SSL::Host.new(name) host.generate_certificate_request host.certificate_request.class.indirection.save(host.certificate_request) end end action :list do summary "List all certificate signing requests." returns <<-'EOT' An array of CSR object #inspect strings. This output is currently messy, but does contain the names of nodes requesting certificates. EOT when_invoked do |options| Puppet::SSL::Host.indirection.search("*", { :for => :certificate_request, }).map { |h| h.inspect } end end action :sign do summary "Sign a certificate signing request for HOST." arguments "" returns <<-'EOT' A string that appears to be an x509 certificate, but is actually not. Retrieve certificates using the `find` action. EOT examples <<-'EOT' Sign somenode.puppetlabs.lan's certificate: $ puppet certificate sign somenode.puppetlabs.lan --ca-location remote EOT when_invoked do |name, options| host = Puppet::SSL::Host.new(name) host.desired_state = 'signed' Puppet::SSL::Host.indirection.save(host) end end # Indirector action doc overrides find = get_action(:find) find.summary "Retrieve a certificate" find.arguments "" find.returns <<-'EOT' An x509 SSL certificate. You will usually want to render this as a string ('--render-as s'). Note that this action has a side effect of caching a copy of the certificate in Puppet's `ssldir`. EOT destroy = get_action(:destroy) destroy.summary "Delete a local certificate." destroy.arguments "" destroy.returns "Nothing." destroy.description <<-'EOT' Deletes a certificate. This action currently only works with a local CA. EOT get_action(:search).summary "Invalid for this face." get_action(:save).summary "Invalid for this face." end diff --git a/lib/puppet/face/certificate_request.rb b/lib/puppet/face/certificate_request.rb index de52b7fb7..29cf7dc78 100644 --- a/lib/puppet/face/certificate_request.rb +++ b/lib/puppet/face/certificate_request.rb @@ -1,54 +1,45 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:certificate_request, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Manage certificate requests." description <<-'EOT' Retrieves and submits certificate signing requests (CSRs). Invoke `search` with a dummy key to retrieve all outstanding CSRs, invoke `find` with a node certificate name to retrieve a specific request, and invoke `save` to submit a CSR. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `ca` - * `file` - * `rest` - EOT # Per-action doc overrides get_action(:destroy).summary "Invalid for this face." get_action(:find).summary "Retrieve a single CSR." get_action(:find).arguments "" get_action(:find).returns <<-'EOT' A single certificate request. In most cases, you will want to render this as a string ('--render-as s'). EOT get_action(:find).examples <<-'EOT' Retrieve a single CSR from the puppet master's CA: $ puppet certificate_request find somenode.puppetlabs.lan --terminus rest EOT get_action(:search).summary "Retrieve all outstanding CSRs." get_action(:search).arguments "" get_action(:search).returns <<-'EOT' An array of certificate request objects. In most cases, you will want to render this as a string ('--render-as s'). EOT get_action(:search).notes "This action always returns all CSRs, but requires a dummy search key." get_action(:search).examples <<-'EOT' Retrieve all CSRs from the local CA: $ puppet certificate_request search x --terminus ca EOT get_action(:save).summary "Submit a certificate signing request." get_action(:save).arguments "" end diff --git a/lib/puppet/face/certificate_revocation_list.rb b/lib/puppet/face/certificate_revocation_list.rb index db00ea3ca..0525a601f 100644 --- a/lib/puppet/face/certificate_revocation_list.rb +++ b/lib/puppet/face/certificate_revocation_list.rb @@ -1,48 +1,39 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:certificate_revocation_list, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Manage the list of revoked certificates." description <<-'EOT' This face is primarily for retrieving the certificate revocation list from the CA. Although it exposes search/save/destroy methods, they shouldn't be used under normal circumstances. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `ca` - * `file` - * `rest` - EOT get_action(:find).summary "Retrieve the certificate revocation list." get_action(:find).arguments "" get_action(:find).returns <<-'EOT' A certificate revocation list. You will usually want to render this as a string ('--render-as s'). EOT get_action(:find).examples <<-'EXAMPLES' Retrieve a copy of the puppet master's CRL: $ puppet certificate_revocation_list find crl --terminus rest EXAMPLES get_action(:destroy).summary "Delete the certificate revocation list." get_action(:destroy).arguments "" get_action(:destroy).returns "Nothing." get_action(:destroy).description <<-'EOT' Deletes the certificate revocation list. This cannot be done over REST, but it is possible to both delete the locally cached copy of the CA's CRL and delete the CA's own copy (if running on the CA machine and invoked with '--terminus ca'). Needless to say, don't do this unless you know what you're up to. EOT get_action(:search).summary "Invalid for this face." get_action(:save).summary "Invalid for this face." end diff --git a/lib/puppet/face/facts.rb b/lib/puppet/face/facts.rb index d7ddf1d51..05028a435 100644 --- a/lib/puppet/face/facts.rb +++ b/lib/puppet/face/facts.rb @@ -1,88 +1,74 @@ require 'puppet/indirector/face' require 'puppet/node/facts' Puppet::Indirector::Face.define(:facts, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Retrieve and store facts." description <<-'EOT' This face manages facts, the collections of normalized system information used by Puppet. It can read facts directly from the local system (using the default `facter` terminus), look up facts reported by other systems, and submit facts to the puppet master. When used with the `rest` terminus, this face is essentially a front-end to the inventory service REST API. See the inventory service documentation for more detail. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `active_record` - * `couch` - * `facter` - * `inventory_active_record` - * `memory` - * `network_device` - * `rest` - * `yaml` - EOT find = get_action(:find) find.summary "Retrieve a host's facts." find.arguments "" find.returns "A Puppet::Node::Facts object." find.notes <<-'EOT' When using the `facter` terminus, the host argument is essentially ignored. EOT find.examples <<-'EOT' Get facts from the local system: $ puppet facts find x Ask the puppet master for facts for an arbitrary node: $ puppet facts find somenode.puppetlabs.lan --terminus rest Query a DB-backed inventory directly (bypassing the REST API): $ puppet facts find somenode.puppetlabs.lan --terminus inventory_active_record --mode master EOT get_action(:destroy).summary "Invalid for this face." get_action(:search).summary "Query format unknown; potentially invalid for this face." action(:upload) do summary "Upload local facts to the puppet master." description <<-'EOT' Reads facts from the local system using the facter terminus, then saves the returned facts using the rest terminus. EOT returns "Nothing." notes <<-'EOT' This action requires that the puppet master's `auth.conf` file allow save access to the `facts` REST terminus. Puppet agent does not use this facility, and it is turned off by default. See for more details. EOT examples <<-'EOT' Upload facts: $ puppet facts upload EOT render_as :yaml when_invoked do |options| Puppet::Node::Facts.indirection.terminus_class = :facter facts = Puppet::Node::Facts.indirection.find(Puppet[:certname]) Puppet::Node::Facts.indirection.terminus_class = :rest Puppet::Node::Facts.indirection.save(facts) Puppet.notice "Uploaded facts for '#{Puppet[:certname]}'" nil end end end diff --git a/lib/puppet/face/file.rb b/lib/puppet/face/file.rb index 70b44c38f..1cf9bc7f3 100644 --- a/lib/puppet/face/file.rb +++ b/lib/puppet/face/file.rb @@ -1,54 +1,47 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:file, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Retrieve and store files in a filebucket" description <<-'EOT' This face interacts with objects stored in a local or remote filebucket. File objects are accessed by their MD5 sum; see the examples for the relevant syntax. EOT notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `file` - * `rest` - To retrieve the unmunged contents of a file, you must call find with --render-as s. Rendering as yaml will return a hash of metadata about the file, including its contents. This face does not interact with the `clientbucketdir` (the default local filebucket for puppet agent); it interacts with the primary "master"-type filebucket located in the `bucketdir`. If you wish to interact with puppet agent's default filebucket, you'll need to set the <--bucketdir> option appropriately when invoking actions. EOT file = get_action(:find) file.summary "Retrieve a file from the filebucket." file.arguments "md5/" file.returns <<-'EOT' The file object with the specified checksum. RENDERING ISSUES: Rendering as a string returns the contents of the file object; rendering as yaml returns a hash of metadata about said file, including but not limited to its contents. Rendering as json is currently broken, and returns a hash containing only the contents of the file. EOT file.examples <<-'EOT' Retrieve the contents of a file: $ puppet file find md5/9aedba7f413c97dc65895b1cd9421f2c --render-as s EOT get_action(:search).summary "Invalid for this face." get_action(:destroy).summary "Invalid for this face." set_indirection_name :file_bucket_file end diff --git a/lib/puppet/face/key.rb b/lib/puppet/face/key.rb index f19ae198f..54c4975c5 100644 --- a/lib/puppet/face/key.rb +++ b/lib/puppet/face/key.rb @@ -1,23 +1,15 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:key, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Create, save, and remove certificate keys." description <<-'EOT' Manages certificate private keys. Keys are created for you automatically when certificate requests are generated with 'puppet certificate generate', and it should not be necessary to use this action directly. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `ca` - * `file` - EOT end diff --git a/lib/puppet/face/node.rb b/lib/puppet/face/node.rb index c68d71846..d244127a4 100644 --- a/lib/puppet/face/node.rb +++ b/lib/puppet/face/node.rb @@ -1,50 +1,37 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:node, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "View and manage node definitions." description <<-'EOT' This face interacts with node objects, which are used by Puppet to build a catalog. A node object consists of the node's facts, environment, node parameters (exposed in the parser as top-scope variables), and classes. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `active_record` - * `exec` - * `ldap` - * `memory` - * `plain` - * `rest` - * `yaml` - EOT get_action(:destroy).summary "Invalid for this face." get_action(:search).summary "Invalid for this face." get_action(:save).summary "Invalid for this face." find = get_action(:find) find.summary "Retrieve a node object." find.arguments "" find.returns <<-'EOT' A Puppet::Node object. RENDERING ISSUES: Rendering as string and json are currently broken; node objects can only be rendered as yaml. EOT find.examples <<-'EOT' Retrieve an "empty" (no classes, fact and bulit-in parameters only, and an environment of "production") node: $ puppet node find somenode.puppetlabs.lan --terminus plain --render-as yaml Retrieve a node using the puppet master's configured ENC: $ puppet node find somenode.puppetlabs.lan --terminus exec --mode master --render-as yaml EOT end diff --git a/lib/puppet/face/report.rb b/lib/puppet/face/report.rb index a5718bc0c..1345d6359 100644 --- a/lib/puppet/face/report.rb +++ b/lib/puppet/face/report.rb @@ -1,65 +1,56 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:report, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Create, display, and submit reports" - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `processor` - * `rest` - * `yaml` - EOT get_action(:find).summary "Invalid for this face." get_action(:search).summary "Invalid for this face." get_action(:destroy).summary "Invalid for this face." save = get_action(:save) save.summary "Submit a report." save.arguments "" save.returns "Nothing." save.examples <<-'EOT' From the implementation of `puppet report submit` (API example): begin Puppet::Transaction::Report.indirection.terminus_class = :rest Puppet::Face[:report, "0.0.1"].save(report) Puppet.notice "Uploaded report for #{report.name}" rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not send report: #{detail}" end EOT action(:submit) do summary "Submit a report object to the puppet master" description <<-'EOT' This action is essentially a shortcut and wrapper for the `save` action with the `rest` terminus, which provides additional details in the event of a report submission failure. It is not intended for use from a command line. EOT examples <<-'EOT' From secret_agent.rb: # ... report = Puppet::Face[:catalog, '0.0.1'].apply Puppet::Face[:report, '0.0.1'].submit(report) return report EOT when_invoked do |report, options| begin Puppet::Transaction::Report.indirection.terminus_class = :rest Puppet::Face[:report, "0.0.1"].save(report) Puppet.notice "Uploaded report for #{report.name}" rescue => detail puts detail.backtrace if Puppet[:trace] Puppet.err "Could not send report: #{detail}" end end end end diff --git a/lib/puppet/face/resource.rb b/lib/puppet/face/resource.rb index 593776e53..59f628675 100644 --- a/lib/puppet/face/resource.rb +++ b/lib/puppet/face/resource.rb @@ -1,59 +1,51 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:resource, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "Interact directly with resources via the RAL, like ralsh" description <<-'EOT' This face provides a Ruby API with functionality similar to the puppet resource (originally ralsh) command line application. It is not intended to be used from the command line. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `ral` - * `rest` - EOT get_action(:destroy).summary "Invalid for this face." search = get_action(:search) search.summary "Get all resources of a single type." search.arguments "" search.returns "An array of resource objects." search.examples <<-'EOT' Get a list of all user resources (API example): all_users = Puppet::Face[:resource, '0.0.1'].search("user") EOT find = get_action(:find) find.summary "Get a single resource." find.arguments "/" find.returns "A resource object." find.examples <<-'EOT' Print information about a user on this system (API example): puts Puppet::Face[:resource, '0.0.1'].find("user/luke").to_pson EOT save = get_action(:save) save.summary "Create a new resource." save.arguments "<resource_object>" save.returns "The same resource object passed." save.examples <<-'EOT' Create a new file resource (API example): my_resource = Puppet::Resource.new( :file, "/tmp/demonstration", :parameters => {:ensure => :present, :content => "some\nthing\n"} ) Puppet::Face[:resource, '0.0.1'].save(my_resource) EOT end diff --git a/lib/puppet/face/resource_type.rb b/lib/puppet/face/resource_type.rb index 3973eb3b8..9d7639fc5 100644 --- a/lib/puppet/face/resource_type.rb +++ b/lib/puppet/face/resource_type.rb @@ -1,78 +1,70 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:resource_type, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "View classes, defined resource types, and nodes from all manifests" description <<-'EOT' This face reads information about the resource collections (classes, nodes, and defined types) available in Puppet's site manifest and modules. It will eventually be extended to examine native resource types. EOT - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `parser` - * `rest` - EOT # Action documentation overrides: get_action(:save).summary = "Invalid for this face." get_action(:destroy).summary = "Invalid for this face." find = get_action(:find) find.summary "Retrieve info about a resource collection." find.arguments "<collection_name>" find.returns <<-'EOT' A hash of info about one resource collection. This hash will include the following four keys: * `file` (a string) * `name` (a string) * `type` (<hostclass>, <definition>, or <node>) * `line` (an integer) It may also include the following keys: * `parent` (<name_of_resource_collection>) * `arguments` (a hash of parameters and default values) * `doc` (a string) RENDERING ISSUES: yaml and string output for this indirection are currently unusable; use json instead. EOT find.examples <<-'EOT' Retrieve info about a specific locally-defined class: $ puppet resource_type find ntp::disabled Retrieve info from the puppet master about a specific class: $ puppet resource_type find ntp --terminus rest EOT search = get_action(:search) search.summary "Search for collections matching a regular expression." search.arguments "<regular_expression>" search.returns <<-'EOT' An array of resource collection info hashes. (See "RETURNS" under `find`.) RENDERING ISSUES: yaml and string output for this indirection are currently unusable; use json instead. EOT search.examples <<-'EOT' Retrieve all classes, nodes, and defined types: $ puppet resource_type search '.*' Search for classes related to Nagios: $ puppet resource_type search nagios EOT end diff --git a/lib/puppet/face/status.rb b/lib/puppet/face/status.rb index 08379550c..4ae24e81b 100644 --- a/lib/puppet/face/status.rb +++ b/lib/puppet/face/status.rb @@ -1,47 +1,39 @@ require 'puppet/indirector/face' Puppet::Indirector::Face.define(:status, '0.0.1') do copyright "Puppet Labs", 2011 license "Apache 2 license; see COPYING" summary "View puppet server status." - notes <<-'EOT' - This is an indirector face, which exposes `find`, `search`, `save`, and - `destroy` actions for an indirected subsystem of Puppet. Valid termini - for this face include: - - * `local` - * `rest` - EOT get_action(:destroy).summary "Invalid for this face." get_action(:save).summary "Invalid for this face." get_action(:search).summary "Invalid for this face." find = get_action(:find) find.summary "Check status of puppet master server." find.arguments "<dummy_key>" find.returns "A Puppet::Status object, or a low-level connection error." find.description <<-'EOT' Checks whether a Puppet server is properly receiving and processing REST requests. This action is only useful when used with '--terminus rest'; when invoked with the `local` terminus, `find` will always return true. This action will query the configured puppet master. To query other servers, including puppet agent nodes started with the --listen option, you can set set the global --server and --masterport options on the command line; note that agent nodes listen on port 8139. EOT find.notes <<-'EOT' This action requires that the server's `auth.conf` file allow find access to the `status` REST terminus. Puppet agent does not use this facility, and it is turned off by default. See <http://docs.puppetlabs.com/guides/rest_auth_conf.html> for more details. EOT find.examples <<-'EOT' Check the status of the configured puppet master: $ puppet status find x --terminus rest EOT end