pdsh
: Installs and configures the pdsh toolpdsh::puppet
: Set up PuppetDB-based pdsh groups
pdsh::puppet_group
: Create a group of hosts using thepdsh_group.rb
script
Installs and configures the pdsh tool
The following parameters are available in the pdsh
class:
Data type: Stdlib::Absolutepath
Stdlib::Absolutepath The configuration directory for pdsh.
(default: /etc/dsh
).
Data type: Stdlib::Absolutepath
Stdlib::Absolutepath The directory where group files for pdsh will be written.
(default: /etc/dsh/group
).
Set up PuppetDB-based pdsh groups
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"]]'
}
}
}
The following parameters are available in the pdsh::puppet
class:
Data type: String
String The hostname of the PuppetDB server to use.
Data type: Hash
Hash of queries to be used in creating pdsh::puppet_group resources.
Default value: {}
Create a group of hosts using the pdsh_group.rb
script
pdsh::puppet_group {'rhel6':
ensure => 'present',
query => '["and",["=",["fact","operatingsystem"],"RedHat"],["=",["fact","operatingsystemmajrelease"],"6"]]'
}
The following parameters are available in the pdsh::puppet_group
defined type:
Data type: String
String The query to pass to the pdsh_group.rb
script to be used in querying PuppetDB.
Data type: Enum['absent', 'present']
Whether this group should be present or absent. (default: 'present')
Default value: 'present'