cellinfo
/
puppet-root
Archived
2
0
Fork 0

Add a variable to set root's default shell.

This commit is contained in:
Jeremy Gardais 2016-11-28 18:52:17 +01:00
parent b230aff861
commit c1d99759ae
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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'