cellinfo
/
puppet-root
Archived
2
0
Fork 0

Rename default_shell_path arg and add doc.

This commit is contained in:
Jeremy Gardais 2016-11-28 19:02:08 +01:00
parent c1d99759ae
commit b024d1db37
4 changed files with 25 additions and 14 deletions

View File

@ -39,6 +39,16 @@ class { 'root':
}
```
### Other default shell
Bash is the default shell use on Debian, if you prefer an advanced shell or didn't have Bash, you can define the DEFAULT_SHELL_PATH argument:
```
class { 'root':
default_shell_path => '/bin/zsh',
}
```
Then, every connection from 10.10.10.1 or 192.168.0.42 will automatically have ZSH as default shell.
## Reference
@ -53,6 +63,7 @@ Then, every connection from 10.10.10.1 or 192.168.0.42 will automatically have Z
* `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'.
* `default_shell_path`: Path to a bin file to use as default shell for root. 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

@ -21,7 +21,7 @@ class root::config {
# Shell
user { 'root':
shell => "${root::default_shell}",
shell => "${root::default_shell_path}",
}

View File

@ -41,7 +41,7 @@ class root (
$bashrc_path = $root::params::bashrc_path,
$bashrc_content = $root::params::bashrc_content,
$bashrc_content = $root::params::bashrc_content,
$default_shell = $root::params::default_shell,
$default_shell_path = $root::params::default_shell_path,
$ip_zsh = $root::params::ip_zsh,
) inherits root::params {

View File

@ -10,7 +10,7 @@ class root::params {
$bashrc_content = 'root/preferences/bashrc.erb'
# Shell
$default_shell = '/bin/bash'
$default_shell_path = '/bin/bash'
# For those IP, auto-launch ZSH as default shell
$ip_zsh = '127.0.0.1'