Skip to content

Latest commit

 

History

History
382 lines (210 loc) · 7.57 KB

REFERENCE.md

File metadata and controls

382 lines (210 loc) · 7.57 KB

Reference

Table of Contents

Classes

Functions

  • pe_event_forwarding::base_path: This custom function returns the base path of any given string argument. If a desired path is not passed in, it will match the default str ar

Tasks

  • activities: This task scrapes the PE activity API for all events.
  • orchestrator: This task scrapes the orchestrator for jobs

Plans

Classes

pe_event_forwarding

This class will create the cron job that executes the event management script. It also creates the event management script in the required directory.

Examples

include pe_event_forwarding

Parameters

The following parameters are available in the pe_event_forwarding class:

pe_username

Data type: Optional[String]

PE username

Default value: undef

pe_password

Data type: Optional[Sensitive[String]]

PE password

Default value: undef

pe_token

Data type: Optional[String]

PE token

Default value: undef

pe_console

Data type: Optional[String]

PE console

Default value: 'localhost'

disabled

Data type: Optional[Boolean]

When true, removes cron job

Default value: false

cron_minute

Data type: Optional[String]

Sets cron minute (0-59)

Default value: '*/2'

cron_hour

Data type: Optional[String]

Sets cron hour (0-23)

Default value: '*'

cron_weekday

Data type: Optional[String]

Sets cron day of the week (0-6)

Default value: '*'

cron_month

Data type: Optional[String]

Sets cron month (1-12)

Default value: '*'

cron_monthday

Data type: Optional[String]

Sets cron day of the month (1-31)

Default value: '*'

log_path

Data type: Optional[String]

Should be a directory; base path to desired location for log files /pe_event_forwarding/pe_event_forwarding.log will be appended to this param

Default value: undef

lock_path

Data type: Optional[String]

Should be a directory; base path to desired location for lock file /pe_event_forwarding/cache/state/events_collection_run.lock will be appended to this param

Default value: undef

confdir

Data type: Optional[String]

Path to directory where pe_event_forwarding exists

Default value: "${pe_event_forwarding::base_path($settings::confdir,undef)}/pe_event_forwarding"

api_page_size

Data type: Optional[Integer]

Sets max number of events retrieved per API call

Default value: undef

log_level

Data type: Enum['DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL']

Determines the severity of logs to be written to log file:

  • level debug will only log debug-level log messages
  • level info will log info, warn, and fatal-level log messages
  • level warn will log warn and fatal-level log messages
  • level fatal will only log fatal-level log messages

Default value: 'WARN'

log_rotation

Data type: Enum['NONE', 'DAILY', 'WEEKLY', 'MONTHLY']

Determines rotation time for log files

Default value: 'NONE'

Functions

pe_event_forwarding::base_path

Type: Ruby 4.x API

This custom function returns the base path of any given string argument. If a desired path is not passed in, it will match the default str argument up to puppetlabs.

Examples

Calling the function
pe_event_forwarding::base_path(default_path, desired_path)

pe_event_forwarding::base_path(Any $str, Any $path)

This custom function returns the base path of any given string argument. If a desired path is not passed in, it will match the default str argument up to puppetlabs.

Returns: String Returns a string

Examples
Calling the function
pe_event_forwarding::base_path(default_path, desired_path)
str

Data type: Any

The backup path to set; default

path

Data type: Any

The desired path

Tasks

activities

This task scrapes the PE activity API for all events.

Supports noop? false

Parameters

pe_console

Data type: String[1]

The FQDN of the PE console

pe_username

Data type: Optional[String[1]]

A PE user name

pe_password

Data type: Optional[String[1]]

The PE console password

orchestrator

This task scrapes the orchestrator for jobs

Supports noop? false

Parameters

console_host

Data type: String[1]

The FQDN of the PE console

username

Data type: Optional[String[1]]

A PE user name

password

Data type: Optional[String[1]]

The PE console password

token

Data type: Optional[String[1]]

An Auth token for a user

operation

Data type: Enum['run_facts_task', 'run_job', 'get_job', 'current_job_count', 'get_jobs']

The task to perform in the orchestrator.

body

Data type: Optional[String[1]]

Data to send to the orchestrator for the operation

nodes

Data type: Optional[String[1]]

Nodes to run facts on. Different from console host target

Plans

pe_event_forwarding::acceptance::pe_server

Install PE Server

Examples

pe_event_forwarding::acceptance::pe_server

Parameters

The following parameters are available in the pe_event_forwarding::acceptance::pe_server plan:

version

Data type: Optional[String]

PE version

Default value: '2019.8.7'

pe_settings

Data type: Optional[Hash]

Hash with key password and value of PE console password for admin user

Default value: {password => 'puppetlabs'}

pe_event_forwarding::acceptance::provision_machines

Provisions machines

Parameters

The following parameters are available in the pe_event_forwarding::acceptance::provision_machines plan:

using

Data type: Optional[String]

provision service

Default value: 'abs'

image

Data type: Optional[String]

os image

Default value: 'centos-7-x86_64'