Add a variable to set root's default shell.
This commit is contained in:
parent
b230aff861
commit
c1d99759ae
|
@ -8,7 +8,7 @@ class root::config {
|
|||
mode => 600,
|
||||
}
|
||||
|
||||
# Set .profile and bashrc files
|
||||
# Preferences files
|
||||
file { $root::profile_path:
|
||||
ensure => present,
|
||||
content => template($root::profile_content),
|
||||
|
@ -19,4 +19,10 @@ class root::config {
|
|||
content => template($root::bashrc_content),
|
||||
}
|
||||
|
||||
# Shell
|
||||
user { 'root':
|
||||
shell => "${root::default_shell}",
|
||||
}
|
||||
|
||||
|
||||
} # Private class: root::config
|
||||
|
|
|
@ -41,6 +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,
|
||||
$ip_zsh = $root::params::ip_zsh,
|
||||
) inherits root::params {
|
||||
|
||||
|
|
|
@ -2,12 +2,15 @@
|
|||
#
|
||||
class root::params {
|
||||
|
||||
# Preferences files
|
||||
$profile_path = '/root/.profile'
|
||||
$profile_content = 'root/preferences/profile.erb'
|
||||
|
||||
$bashrc_path = '/root/.bashrc'
|
||||
$bashrc_content = 'root/preferences/bashrc.erb'
|
||||
|
||||
# Shell
|
||||
$default_shell = '/bin/bash'
|
||||
# For those IP, auto-launch ZSH as default shell
|
||||
$ip_zsh = '127.0.0.1'
|
||||
|
||||
|
|
Reference in New Issue