Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ The following parameters are available in the `clustershell` class:
* [`color`](#-clustershell--color)
* [`fd_max`](#-clustershell--fd_max)
* [`history_size`](#-clustershell--history_size)
* [`maxrc`](#-clustershell--maxrc)
* [`node_count`](#-clustershell--node_count)
* [`verbosity`](#-clustershell--verbosity)
* [`confdir`](#-clustershell--confdir)
* [`ssh_user`](#-clustershell--ssh_user)
* [`ssh_path`](#-clustershell--ssh_path)
* [`ssh_options`](#-clustershell--ssh_options)
Expand All @@ -51,6 +53,7 @@ The following parameters are available in the `clustershell` class:
* [`python_package_name`](#-clustershell--python_package_name)
* [`conf_dir`](#-clustershell--conf_dir)
* [`conf`](#-clustershell--conf)
* [`clush_conf_dir`](#-clustershell--clush_conf_dir)
* [`conf_template`](#-clustershell--conf_template)
* [`defaults_conf`](#-clustershell--defaults_conf)
* [`defaults_conf_template`](#-clustershell--defaults_conf_template)
Expand Down Expand Up @@ -116,6 +119,14 @@ Value for clush.conf history_size

Default value: `100`

##### <a name="-clustershell--maxrc"></a>`maxrc`

Data type: `String`

Value for clush.conf maxrc

Default value: `'no'`

##### <a name="-clustershell--node_count"></a>`node_count`

Data type: `String`
Expand All @@ -132,6 +143,14 @@ Value for clush.conf verbosity

Default value: `'1'`

##### <a name="-clustershell--confdir"></a>`confdir`

Data type: `String`

Value for clush.conf confdir

Default value: `'/etc/clustershell/clush.conf.d $CFGDIR/clush.conf.d'`

##### <a name="-clustershell--ssh_user"></a>`ssh_user`

Data type: `Optional[String]`
Expand Down Expand Up @@ -220,6 +239,14 @@ Path to clush.conf

Default value: `'/etc/clustershell/clush.conf'`

##### <a name="-clustershell--clush_conf_dir"></a>`clush_conf_dir`

Data type: `Stdlib::Absolutepath`

path to clush.conf.d

Default value: `'/etc/clustershell/clush.conf.d'`

##### <a name="-clustershell--conf_template"></a>`conf_template`

Data type: `String[1]`
Expand Down
17 changes: 17 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
# Value for clush.conf fd_max
# @param history_size
# Value for clush.conf history_size
# @param maxrc
# Value for clush.conf maxrc
# @param node_count
# Value for clush.conf node_count
# @param verbosity
# Value for clush.conf verbosity
# @param confdir
# Value for clush.conf confdir
# @param ssh_user
# SSH user
# @param ssh_path
Expand All @@ -41,6 +45,8 @@
# Path to clustershell configuration directory
# @param conf
# Path to clush.conf
# @param clush_conf_dir
# path to clush.conf.d
# @param conf_template
# clush.conf template
# @param defaults_conf
Expand Down Expand Up @@ -80,8 +86,10 @@
String $color = 'auto',
Integer $fd_max = 8192,
Integer $history_size = 100,
String $maxrc = 'no',
String $node_count = 'yes',
String $verbosity = '1',
String $confdir = '/etc/clustershell/clush.conf.d $CFGDIR/clush.conf.d',
Optional[String] $ssh_user = undef,
String $ssh_path = 'ssh',
String $ssh_options = '-oStrictHostKeyChecking=no',
Expand All @@ -93,6 +101,7 @@
String[1] $python_package_name = 'python3-clustershell',
Stdlib::Absolutepath $conf_dir = '/etc/clustershell',
Stdlib::Absolutepath $conf = '/etc/clustershell/clush.conf',
Stdlib::Absolutepath $clush_conf_dir = '/etc/clustershell/clush.conf.d',
String[1] $conf_template = 'clustershell/clush.conf.erb',
Stdlib::Absolutepath $defaults_conf = '/etc/clustershell/defaults.conf',
String[1] $defaults_conf_template = 'clustershell/defaults.conf.erb',
Expand Down Expand Up @@ -179,6 +188,14 @@
content => template($conf_template),
}

file { '/etc/clustershell/clush.conf.d':
ensure => 'directory',
path => $clush_conf_dir,
owner => 'root',
group => 'root',
mode => '0755',
}

file { '/etc/clustershell/defaults.conf':
ensure => 'file',
path => $defaults_conf,
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/clustershell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@
'color: auto',
'fd_max: 8192',
'history_size: 100',
'maxrc: no',
'node_count: yes',
'verbosity: 1',
'confdir: /etc/clustershell/clush.conf.d $CFGDIR/clush.conf.d',
'ssh_path: ssh',
'ssh_options: -oStrictHostKeyChecking=no',
],)
Expand Down
2 changes: 2 additions & 0 deletions templates/clush.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ command_timeout: <%= @command_timeout %>
color: <%= @color %>
fd_max: <%= @fd_max %>
history_size: <%= @history_size %>
maxrc: <%= @maxrc %>
node_count: <%= @node_count %>
verbosity: <%= @verbosity %>
confdir: <%= @confdir %>

# Add always all remote hosts to known_hosts without confirmation
<% if @ssh_user -%>
Expand Down
Loading