Skip to content

Latest commit

 

History

History
638 lines (346 loc) · 11.4 KB

REFERENCE.md

File metadata and controls

638 lines (346 loc) · 11.4 KB

Reference

Table of Contents

Classes

Defined types

Functions

Classes

salt::api

Init class for the salt-api. Contains all necessary classes and dependencies to manage salt-api.

Examples

install salt-api
include salt::api

Parameters

The following parameters are available in the salt::api class.

package_manage

Data type: Boolean

true or false. Manage the package Default: true

package_name

Data type: String[1]

Name of the package to install Default: salt-api

package_ensure

Data type: String

absent or present or any valid package version. Example: 2019.2.0+ds-1 (to install a specific version) Default: lookup('salt::master::package_ensure')

package_release

Data type: String

latest or any valid release. This variable is used for the repo url. More infos here: [https://repo.saltstack.com/] Example: 2019.2.0 (To pin the repo url to a specific version) Default: lookup('salt::master::package_release')

additional_packages

Data type: Optional[Variant[Array, Hash]]

Any additional packages you want to install. More infos, what you can set here: [https://forge.puppet.com/puppetlabs/stdlib/5.2.0/readme#ensure_packages] Default: undef

service_enable

Data type: Boolean

true or false. Enable or disable the service Default: true

service_ensure

Data type: Enum['stopped', 'running']

stopped or running. Default: running

service_name

Data type: String

Set the service name to manage. Default: salt-api

config_dir

Data type: Optional[Stdlib::Absolutepath]

Set the config dir. Default: /etc/salt

config_file

Data type: Stdlib::Absolutepath

Set the absolute config file path. Default: %{lookup('salt::api::config_dir')}/master

configs

Data type: Optional[Hash]

Any config parameter you want to deploy. You can copy the YAML structure from your existing config file and paste it here. Default: undef

salt::api::config

Class: salt::api::config

salt::api::install

Class: salt::api::install

salt::api::service

Class: salt::api::service

salt::master

Init class for the salt-master. Contains all necessary classes and dependencies to manage salt-master.

Examples

install salt-master
include salt::master

Parameters

The following parameters are available in the salt::master class.

package_manage

Data type: Boolean

true or false. Manage the package Default: true

package_name

Data type: String[1]

Name of the package to install Default: salt-master

package_ensure

Data type: String

absent or present or any valid package version. Example: 2019.2.0+ds-1 (to install a specific version) Default: present

package_release

Data type: String

latest or any valid release. This variable is used for the repo url. More infos here: [https://repo.saltstack.com/] Example: 2019.2.0 (To pin the repo url to a specific version) Default: latest

additional_packages

Data type: Optional[Variant[Array, Hash]]

Any additional packages you want to install. More infos, what you can set here: [https://forge.puppet.com/puppetlabs/stdlib/5.2.0/readme#ensure_packages] Default: undef

service_enable

Data type: Boolean

true or false. Enable or disable the service Default: true

service_ensure

Data type: Enum['stopped', 'running']

stopped or running. Default: running

service_name

Data type: String

Set the service name to manage. Default: salt-master

config_dir

Data type: Optional[Stdlib::Absolutepath]

Set the config dir. Default: /etc/salt

config_file

Data type: Stdlib::Absolutepath

Set the absolute config file path. Default: %{lookup('salt::master::config_dir')}/master

configs

Data type: Optional[Hash]

Any config parameter you want to deploy. You can copy the YAML structure from your existing config file and paste it here. Example: log_level: info fileserver_backend: - roots Default: undef

salt::master::config

Class: salt::master::config

salt::master::install

Class: salt::master::install

salt::master::service

Class: salt::master::service

salt::minion

Init class for the salt-minion. Contains all necessary classes and dependencies to manage salt-minion.

Examples

install salt-minion
include salt::minion

Parameters

The following parameters are available in the salt::minion class.

package_manage

Data type: Boolean

true or false. Manage the package Default: true

package_name

Data type: String[1]

Name of the package to install Default: salt-minion

package_ensure

Data type: String

absent or present or any valid package version. Example: 2019.2.0+ds-1 (to install a specific version) Default: lookup('salt::master::package_ensure')

package_release

Data type: String

latest or any valid release. This variable is used for the repo url. More infos here: [https://repo.saltstack.com/] Example: 2019.2.0 (To pin the repo url to a specific version) Default: lookup('salt::master::package_release')

additional_packages

Data type: Optional[Variant[Array, Hash]]

Any additional packages you want to install. More infos, what you can set here: [https://forge.puppet.com/puppetlabs/stdlib/5.2.0/readme#ensure_packages] Default: undef

service_enable

Data type: Boolean

true or false. Enable or disable the service Default: true

service_ensure

Data type: Enum['stopped', 'running']

stopped or running. Default: running

service_name

Data type: String

Set the service name to manage. Default: salt-minion

config_dir

Data type: Optional[Stdlib::Absolutepath]

Set the config dir. Default: /etc/salt

config_file

Data type: Stdlib::Absolutepath

Set the absolute config file path. Default: %{lookup('salt::minion::config_dir')}/minion

configs

Data type: Optional[Hash]

Any config parameter you want to deploy. You can copy the YAML structure from your existing config file and paste it here. Default: undef

salt::minion::config

Class: salt::minion::config

salt::minion::install

Class: salt::minion::install

salt::minion::service

Class: salt::minion::service

salt::pepper

Class: salt::pepper

Parameters

The following parameters are available in the salt::pepper class.

package_manage

Data type: Boolean

package_name

Data type: String[1]

package_ensure

Data type: String

package_provider

Data type: String

additional_packages

Data type: Optional[Variant[Array, Hash]]

config_dir

Data type: Optional[Stdlib::Absolutepath]

config_file

Data type: Optional[Stdlib::Absolutepath]

configs

Data type: Optional[Hash]

environment_dir

Data type: Optional[Stdlib::Absolutepath]

environment_file

Data type: Optional[Stdlib::Absolutepath]

environments

Data type: Optional[Array]

salt::pepper::config

Class: salt::pepper::config

salt::pepper::install

Class: salt::pepper::install

Defined types

salt::api::config::create

Define: salt::api::config::create

Parameters

The following parameters are available in the salt::api::config::create defined type.

data

Data type: Hash

target

Data type: String

Default value: $salt::api::config_file

priority

Data type: Integer

Default value: 50

salt::generate_concat

Define: salt::generate_concat

Parameters

The following parameters are available in the salt::generate_concat defined type.

target

Data type: Stdlib::Absolutepath

Default value: $title

salt::master::config::create

Define: salt::master::config::create

Parameters

The following parameters are available in the salt::master::config::create defined type.

data

Data type: Hash

target

Data type: String

Default value: $salt::master::config_file

priority

Data type: Integer

Default value: 50

salt::minion::config::create

Define: salt::minion::config::create

Parameters

The following parameters are available in the salt::minion::config::create defined type.

data

Data type: Hash

target

Data type: String

Default value: $salt::minion::config_file

priority

Data type: Integer

Default value: 50

salt::repo

Define for the SaltStack Repo Adds the nessesary package repo to download the SaltStack packages.

Parameters

The following parameters are available in the salt::repo defined type.

salt_release

Data type: String

latest or any valid release. This variable is used for the repo url. More infos here: [https://repo.saltstack.com/] Example: 2019.2.0 (To pin the repo url to a specific version)

Default value: $title

base_repo_url

Data type: String

Base Repo URL from which to use to download the packages.

Default value: 'http://repo.saltstack.com'

Functions

to_direct_yaml

Type: Ruby 4.x API

Convert a data structure and output it as YAML

Examples

how to output YAML
# output yaml to a file
  file { '/tmp/my.yaml':
    ensure  => file,
    content => to_direct_yaml($myhash),
  }

to_direct_yaml(Any $data)

The to_direct_yaml function.

Returns: String

Examples
how to output YAML
# output yaml to a file
  file { '/tmp/my.yaml':
    ensure  => file,
    content => to_direct_yaml($myhash),
  }
data

Data type: Any