Skip to content

Latest commit

 

History

History
359 lines (207 loc) · 8.34 KB

REFERENCE.md

File metadata and controls

359 lines (207 loc) · 8.34 KB

Reference

Table of Contents

Classes

Defined types

Data types

Classes

facter

This class will manage facter and allow you to specify external facts.

Parameters

The following parameters are available in the facter class:

manage_facts_d_dir

Data type: Boolean

Boolean to determine if the external facts directory will be managed.

Default value: true

purge_facts_d

Data type: Boolean

Boolean to determine if the external facts directory should be purged. This will remove files not managed by Puppet.

Default value: false

facts_d_dir

Data type: Stdlib::Absolutepath

Path to the directory which will contain the external facts.

Default value: '/etc/facter/facts.d'

facts_d_owner

Data type: String[1]

The owner of the facts_d_dir.

Default value: 'root'

facts_d_group

Data type: String[1]

The group of the facts_d_dir.

Default value: 'root'

facts_d_mode

Data type: Stdlib::Filemode

The mode of the facts_d_dir.

Default value: '0755'

path_to_facter

Data type: Stdlib::Absolutepath

The path to the facter binary.

Default value: '/opt/puppetlabs/bin/facter'

path_to_facter_symlink

Data type: Stdlib::Absolutepath

Path to a symlink that points to the facter binary.

Default value: '/usr/local/bin/facter'

ensure_facter_symlink

Data type: Boolean

Boolean to determine if the symlink should be present.

Default value: false

facts_hash

Data type: Hash

A hash of facter::fact entries.

Default value: {}

structured_data_facts_hash

Data type: Hash

A hash of facter::structured_data_fact entries.

Default value: {}

facts_file

Data type: Pattern[/\.txt*\Z/]

The file in which the text based external facts are stored. This file must end with '.txt'.

Default value: 'facts.txt'

facts_file_owner

Data type: String[1]

The owner of the facts_file.

Default value: 'root'

facts_file_group

Data type: String[1]

The group of the facts_file.

Default value: 'root'

facts_file_mode

Data type: Stdlib::Filemode

The mode of the facts_file.

Default value: '0644'

facter_conf_dir

Data type: Stdlib::Absolutepath

The facter configuration directory

Default value: '/etc/puppetlabs/facter'

facter_conf_dir_owner

Data type: String[1]

The facter configuration directory owner

Default value: 'root'

facter_conf_dir_group

Data type: String[1]

The facter configuration directory group owner

Default value: 'root'

facter_conf_dir_mode

Data type: Stdlib::Filemode

The facter configuration directory mode

Default value: '0755'

facter_conf_name

Data type: String[1]

The facter configuration file name

Default value: 'facter.conf'

facter_conf_owner

Data type: String[1]

The facter configuration file name owner

Default value: 'root'

facter_conf_group

Data type: String[1]

The facter configuration file name group owner

Default value: 'root'

facter_conf_mode

Data type: Stdlib::Filemode

The facter configuration file name mode

Default value: '0644'

facter_conf

Data type: Facter::Conf

Hash of facter configurations

Default value: {}

Defined types

facter::fact

Define txt based external facts

Parameters

The following parameters are available in the facter::fact defined type:

value

Data type: String[1]

Value of the fact.

fact

Data type: String[1]

Name of the fact

Default value: $name

file

Data type: Optional[String[1]]

File in which the fact will be placed. If not specified, use the default facts file.

Default value: undef

facts_dir

Data type: Optional[Stdlib::Absolutepath]

Directory in which the file will be placed. If not specified, use the default facts_d_dir.

Default value: undef

facter::structured_data_fact

Define YAML based external structured data facts.

Parameters

The following parameters are available in the facter::structured_data_fact defined type:

data

Data type: Hash[String[1], Data]

A hash of facts. All keys must be strings.

file

Data type: Pattern[/\.yaml*\Z/]

File in which the fact will be placed. The file name must end with '.yaml'.

Default value: 'facts.yaml'

facts_dir

Data type: Optional[Stdlib::Absolutepath]

Directory in which the file will be placed. If not specified, use the default facts_d_dir.

Default value: undef

Data types

Facter::Conf

The Facter::Conf data type.

Alias of

Struct[{
  'facts'  => Optional[Struct[{
    'blocklist' => Optional[Array[String]],
    'ttls'      => Optional[Array[Hash]]
  }]],
  'global' => Optional[Struct[{
    'external-dir'      => Optional[Array[Stdlib::Absolutepath]],
    'custom-dir'        => Optional[Array[Stdlib::Absolutepath]],
    'no-external-facts' => Optional[Boolean],
    'no-custom-facts'   => Optional[Boolean],
    'no-ruby'           => Optional[Boolean]
  }]],
  'cli'    => Optional[Struct[{
    'debug'     => Optional[Boolean],
    'trace'     => Optional[Boolean],
    'verbose'   => Optional[Boolean],
    'log-level' => Optional[Boolean]
  }]]
}]