Skip to content

Latest commit

 

History

History
124 lines (75 loc) · 2.55 KB

REFERENCE.md

File metadata and controls

124 lines (75 loc) · 2.55 KB

Reference

Table of Contents

Classes

  • pdsh: Installs and configures the pdsh tool
  • pdsh::puppet: Set up PuppetDB-based pdsh groups

Defined types

Classes

pdsh

Installs and configures the pdsh tool

Parameters

The following parameters are available in the pdsh class:

config_dir

Data type: Stdlib::Absolutepath

Stdlib::Absolutepath The configuration directory for pdsh. (default: /etc/dsh).

group_dir

Data type: Stdlib::Absolutepath

Stdlib::Absolutepath The directory where group files for pdsh will be written. (default: /etc/dsh/group).

pdsh::puppet

Set up PuppetDB-based pdsh groups

Examples

class { 'pdsh::puppet'
  $queries => {
    rhel6 => {
      ensure => 'present',
      query  => '["and",["=",["fact","operatingsystem"],"RedHat"],["=",["fact","operatingsystemmajrelease"],"6"]]'
    }
    rhel7 => {
      ensure => 'absent',
      query  => '["and",["=",["fact","operatingsystem"],"RedHat"],["=",["fact","operatingsystemmajrelease"],"7"]]'
    }
  }
}

Parameters

The following parameters are available in the pdsh::puppet class:

puppetdb

Data type: String

String The hostname of the PuppetDB server to use.

queries

Data type: Hash

Hash of queries to be used in creating pdsh::puppet_group resources.

Default value: {}

Defined types

pdsh::puppet_group

Create a group of hosts using the pdsh_group.rb script

Examples

pdsh::puppet_group {'rhel6':
  ensure => 'present',
  query  => '["and",["=",["fact","operatingsystem"],"RedHat"],["=",["fact","operatingsystemmajrelease"],"6"]]'
}

Parameters

The following parameters are available in the pdsh::puppet_group defined type:

query

Data type: String

String The query to pass to the pdsh_group.rb script to be used in querying PuppetDB.

ensure

Data type: Enum['absent', 'present']

Whether this group should be present or absent. (default: 'present')

Default value: 'present'