cellinfo
/
puppet-root
Archived
2
0
Fork 0

Add test to verify the variables.

This commit is contained in:
Jeremy Gardais 2016-11-29 16:01:47 +01:00
parent 70693afe26
commit 76b63b95fd
2 changed files with 19 additions and 8 deletions

View File

@ -70,14 +70,14 @@ class { 'root':
### Parameters
* `profile_path`: Path to the .profile to load personal initialization. Defaults to '/root/.profile'.
* `profile_content`: Template file used to generate the previous configuration file. Defaults to 'root/preferences/profile.erb'.
* `bashrc_path`: Path to the Bash's rcfile. Defaults to '/root/.bashrc'.
* `bashrc_content`: Template file used to generate the previous configuration file. Default to 'root/preferences/bashrc.erb'.
* `forward_path`: Path to the forward file. Defaults to '/root/.forward'.
* `forward_content`: Template file used to generate the previous configuration file. Default to 'root/preferences/forward.erb'.
* `address_to_forward`: List of addresses that must receive root's mails. Default to ''.
* `default_shell_path`: Path to a bin file to use as default shell for root. Defaults to '/bin/bash'.
* `profile_path`: Path to the .profile to load personal initialization. Must be a absolut path, defaults to '/root/.profile'.
* `profile_content`: Template file used to generate the previous configuration file. Must be a string ending with **.erb**, defaults to 'root/preferences/profile.erb'.
* `bashrc_path`: Path to the Bash's rcfile. Must be a absolut path, defaults to '/root/.bashrc'.
* `bashrc_content`: Template file used to generate the previous configuration file. Must be a string ending with **.erb**, default to 'root/preferences/bashrc.erb'.
* `forward_path`: Path to the forward file. Must be a absolut path, defaults to '/root/.forward'.
* `forward_content`: Template file used to generate the previous configuration file. Must be a string ending with **.erb**, default to 'root/preferences/forward.erb'.
* `address_to_forward`: List of addresses that must receive root's mails. Must be a string, default to ''.
* `default_shell_path`: Path to a bin file to use as default shell for root. Must be a absolut path, defaults to '/bin/bash'.
* `ip_zsh`: A regex to determine if a ssh client should have ZSH as default shell. Defaults to '127.0.0.1'.
## Limitations

View File

@ -48,6 +48,17 @@ class root (
$ip_zsh = $root::params::ip_zsh,
) inherits root::params {
validate_re($profile_path, '^/')
validate_re($profile_content, '.erb$')
validate_re($bashrc_path, '^/')
validate_re($bashrc_content, '.erb$')
validate_re($forward_path, '^/')
validate_re($forward_content, '.erb$')
validate_string($address_to_forward)
validate_re($default_shell_path, '^/')
include '::root::config'
} # public class: root