Method: Puppet::Confiner#confine

Defined in:
lib/puppet/confiner.rb

#confine(hash) ⇒ void

This method returns an undefined value.

Confines a provider to be suitable only under the given conditions. The hash describes a confine using mapping from symbols to values or predicate code.

  • fact_name => value of fact (or array of facts)

  • :exists => the path to an existing file

  • :true => a predicate code block returning true

  • :false => a predicate code block returning false

  • :feature => name of system feature that must be present

  • :any => an array of expressions that will be ORed together

Examples:

confine 'os.name' => [:redhat, :fedora]
confine :true { ... }


28
29
30
# File 'lib/puppet/confiner.rb', line 28

def confine(hash)
  confine_collection.confine(hash)
end