Rename default_shell_path arg and add doc.
This commit is contained in:
parent
c1d99759ae
commit
b024d1db37
11
README.md
11
README.md
|
@ -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.
|
Then, every connection from 10.10.10.1 or 192.168.0.42 will automatically have ZSH as default shell.
|
||||||
|
|
||||||
## Reference
|
## 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'.
|
* `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_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'.
|
* `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'.
|
* `ip_zsh` : A regex to determine if a ssh client should have ZSH as default shell. Defaults to '127.0.0.1'.
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
|
@ -21,7 +21,7 @@ class root::config {
|
||||||
|
|
||||||
# Shell
|
# Shell
|
||||||
user { 'root':
|
user { 'root':
|
||||||
shell => "${root::default_shell}",
|
shell => "${root::default_shell_path}",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ class root (
|
||||||
$bashrc_path = $root::params::bashrc_path,
|
$bashrc_path = $root::params::bashrc_path,
|
||||||
$bashrc_content = $root::params::bashrc_content,
|
$bashrc_content = $root::params::bashrc_content,
|
||||||
$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,
|
$ip_zsh = $root::params::ip_zsh,
|
||||||
) inherits root::params {
|
) inherits root::params {
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class root::params {
|
||||||
$bashrc_content = 'root/preferences/bashrc.erb'
|
$bashrc_content = 'root/preferences/bashrc.erb'
|
||||||
|
|
||||||
# Shell
|
# Shell
|
||||||
$default_shell = '/bin/bash'
|
$default_shell_path = '/bin/bash'
|
||||||
# For those IP, auto-launch ZSH as default shell
|
# For those IP, auto-launch ZSH as default shell
|
||||||
$ip_zsh = '127.0.0.1'
|
$ip_zsh = '127.0.0.1'
|
||||||
|
|
||||||
|
|
Reference in New Issue