Skip to content

Latest commit

 

History

History
240 lines (124 loc) · 4.77 KB

REFERENCE.md

File metadata and controls

240 lines (124 loc) · 4.77 KB

Reference

Table of Contents

Classes

  • augeas: Class: augeas Install and configure Augeas Parameters: ['lens_dir'] - the lens directory to use ['purge'] - whether to purge
  • augeas::files: Class: augeas::files Sets up directories and files for Augeas

Defined types

  • augeas::lens: Definition: augeas::lens Deploy an Augeas lens (and its test file). Check the lens (and run the unit tests) automatically and remove the fil

Functions

Classes

augeas

Class: augeas

Install and configure Augeas

Parameters: ['lens_dir'] - the lens directory to use ['purge'] - whether to purge lens directories

Parameters

The following parameters are available in the augeas class:

aio_lens_dir

Data type: Stdlib::Absolutepath

system_lens_dir

Data type: Stdlib::Absolutepath

files_owner

Data type: String

Default value: 'root'

files_group

Data type: String

Default value: 'root'

lens_dir

Data type: Optional[Stdlib::Absolutepath]

Default value: undef

purge

Data type: Boolean

Default value: true

augeas::files

Class: augeas::files

Sets up directories and files for Augeas

Defined types

augeas::lens

Definition: augeas::lens

Deploy an Augeas lens (and its test file). Check the lens (and run the unit tests) automatically and remove the files if the checks fail.

Parameters: ['ensure'] - present/absent ['lens_content'] - the content of the lens ['lens_source'] - the source for the lens ['test_content'] - optionally, the content of the test ['test_source'] - optionally, the source for the test file. ['stock_since'] - optionally, indicate in which version of Augeas the lens became stock, so it will not be deployed above that version.

Example usage:

augeas::lens { 'networkmanager': lens_content => file('networkmanager/lenses/networkmanager.aug'), test_content => file('networkmanager/lenses/test_networkmanager.aug'), stock_since => '1.0.0', }

Parameters

The following parameters are available in the augeas::lens defined type:

ensure

Data type: Any

Default value: present

lens_content

Data type: Any

Default value: undef

lens_source

Data type: Any

Default value: undef

test_content

Data type: Any

Default value: undef

test_source

Data type: Any

Default value: undef

stock_since

Data type: Any

Default value: false

Functions

augeas

Type: Ruby 4.x API

Example:

augeas("proc /proc proc nodev,noexec,nosuid 0 0 ", 'Fstab.lns', ['rm ./1/opt[3]'])

Would result in:

"proc /proc proc nodev,noexec 0 0 "

augeas(String $content, String $lens, Array[String] $changes)

Example:

augeas("proc /proc proc nodev,noexec,nosuid 0 0 ", 'Fstab.lns', ['rm ./1/opt[3]'])

Would result in:

"proc /proc proc nodev,noexec 0 0 "

Returns: String The resulting string.

content

Data type: String

The string to modify.

lens

Data type: String

The lens to use for parsing.

changes

Data type: Array[String]

An array of changes to apply to the string.

augeas::lens_dir

Type: Puppet Language

function to return augeas lens directory

augeas::lens_dir()

The augeas::lens_dir function.

Returns: String