Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Latest commit

 

History

History
427 lines (237 loc) · 9.61 KB

REFERENCE.md

File metadata and controls

427 lines (237 loc) · 9.61 KB

Reference

Table of Contents

Classes

  • upstart: This class allows you to configure the upstart init files Unless otherwise noted, the variables passed to this class set up ``/etc/sysconfig

Defined types

  • upstart::job: This define allows you to manage upstart jobs in /etc/init. See init(5) for more information. All variables lacking comments come directly f

Functions

Data types

Classes

upstart

This class allows you to configure the upstart init files

Unless otherwise noted, the variables passed to this class set up /etc/sysconfig/init

This only sets security-relevant options. You'll need to use the augeas provider to prod different values in the target file but this provides a good example.

  • See also
    • init(8)

Parameters

The following parameters are available in the upstart class:

auditd

Data type: Boolean

If true, includes SIMP's ::auditd class and then adds upstart audit rule

Default value: simplib::lookup('simp_options::auditd', { 'default_value' => false })

Defined types

upstart::job

This define allows you to manage upstart jobs in /etc/init.

See init(5) for more information. All variables lacking comments come directly from init(5)

Parameters

The following parameters are available in the upstart::job defined type:

start_on

Data type: String

The set of events that will cause the job to be automatically started.

main_process_type

Data type: Upstart::Process

The type of the main process, may be one of 'exec' or 'script'.

Default value: 'exec'

main_process

Data type: Optional[String]

The content of the main process.

Default value: undef

pre_start_type

Data type: Upstart::Process

The type of the pre-start script, may be one of 'exec' or 'script'.

Default value: 'exec'

pre_start

Data type: Optional[String]

The content of the pre-start stanza.

Default value: undef

post_start_type

Data type: Upstart::Process

The type of the post-start script, may be one of 'exec' or 'script'

Default value: 'exec'

post_start

Data type: Optional[String]

The content of the post-start stanza.

Default value: undef

pre_stop_type

Data type: Upstart::Process

The type of the pre-stop script, may be one of 'exec' or 'script'

Default value: 'exec'

pre_stop

Data type: Optional[String]

The content of the pre-stop stanza.

Default value: undef

post_stop_type

Data type: Upstart::Process

The type of the post-stop script, may be one of 'exec' or 'script'

Default value: 'exec'

post_stop

Data type: Optional[String]

The content of the post-stop stanza.

Default value: undef

stop_on

Data type: Optional[String]

The set of events that will cause the job to be automatically stopped.

Default value: undef

default_env

Data type: Optional[String]

Corresponds to the 'env' keyword.

Default value: undef

env_export

Data type: Optional[String]

Corresponds to the 'export' keyword.

Default value: undef

is_task

Data type: Boolean

Corresponds to the 'task' keyword.

Default value: false

respawn_limit

Data type: Optional[Array[Integer,2,2]]

An array containing two integers corresponding to 'count' and 'interval' for the 'respawn limit' keyword.

Default value: undef

normal_exit

Data type: Optional[Array[String]]

An array of exit statuses and/or signals that indicate tat the job has terminated successfully.

Default value: undef

instance_name

Data type: Optional[String]

The 'instance' keyword.

Default value: undef

description

Data type: Optional[String]

The description of the job.

Default value: undef

doc_version

Data type: Optional[String]

The jversion information about the job. Maps to the 'version' keyword.

Default value: undef

emits

Data type: Optional[Array[String]]

An array of arbitrary events to emit.

Default value: undef

console

Data type: Optional[Upstart::Console]

Option to connect standard input, output, and error to /dev/console. Value may be 'output' or 'owner'.

Default value: undef

nice

Data type: Optional[Integer]

The process's nice value.

Default value: undef

oom

Data type: Optional[String]

The OOM killer setting.

Default value: undef

chroot

Data type: Optional[Stdlib::Absolutepath]

The directory underneath which the process will be run in a chroot.

Default value: undef

chdir

Data type: Optional[Stdlib::Absolutepath]

The directory to be the root of the chroot instead of the root of the filesystem.

Default value: undef

sys_limit

Data type: Optional[Array[String, 3, 3]]

Maps to the 'limit' keyword. Accepts a three item array of values that should be 'LIMIT','SOFT', and 'HARD' respectively.

Default value: undef

kill_timeout

Data type: Optional[Integer]

The interval between sending the job's main process the SIGTERM and SIGKILL signals when stopping the running job.

Default value: undef

expect_stop

Data type: Boolean

Maps to 'expect stop'.

Default value: false

expect_daemon

Data type: Boolean

Maps to 'expect daemon'.

Default value: false

expect_fork

Data type: Boolean

Maps to 'expect fork'.

Default value: false

respawn

Data type: Boolean

Default value: false

author

Data type: Optional[String]

Default value: undef

umask

Data type: Simplib::Umask

Default value: '022'

Functions

upstart::validate_sys_limit

Type: Ruby 4.x API

Validate the initial system resource limits for a job's processes

See init(5) for more information.

upstart::validate_sys_limit(Optional[Array[String, 3, 3]] $sys_limit)

Validate the initial system resource limits for a job's processes

See init(5) for more information.

Returns: Any true in validation succeeds

Raises:

  • upon any validation failure
sys_limit

Data type: Optional[Array[String, 3, 3]]

3-tuple containing the limit name, soft limit, and hard limit

Data types

Upstart::Console

The Upstart::Console data type.

Alias of Enum['output', 'owner']

Upstart::Process

The Upstart::Process data type.

Alias of Enum['exec', 'script']