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}",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@
|
||||||
# Copyright 2016 Your name here, unless otherwise noted.
|
# Copyright 2016 Your name here, unless otherwise noted.
|
||||||
#
|
#
|
||||||
class root (
|
class root (
|
||||||
$profile_path = $root::params::profile_path,
|
$profile_path = $root::params::profile_path,
|
||||||
$profile_content = $root::params::profile_content,
|
$profile_content = $root::params::profile_content,
|
||||||
$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 {
|
||||||
|
|
||||||
include '::root::config'
|
include '::root::config'
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
class root::params {
|
class root::params {
|
||||||
|
|
||||||
# Preferences files
|
# Preferences files
|
||||||
$profile_path = '/root/.profile'
|
$profile_path = '/root/.profile'
|
||||||
$profile_content = 'root/preferences/profile.erb'
|
$profile_content = 'root/preferences/profile.erb'
|
||||||
|
|
||||||
$bashrc_path = '/root/.bashrc'
|
$bashrc_path = '/root/.bashrc'
|
||||||
$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'
|
||||||
|
|
||||||
} # Private class: root::params
|
} # Private class: root::params
|
||||||
|
|
Reference in New Issue