Skip to content

Commit

Permalink
Merge pull request #23 from fdammeke/master
Browse files Browse the repository at this point in the history
[USER] Attempt to add some custom folder to path users
  • Loading branch information
dieterdemeyer committed Jul 7, 2015
2 parents 8535225 + 112a370 commit 7318de8
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions manifests/localuser.pp
Expand Up @@ -121,8 +121,8 @@
case $ensure_real {
'absent': {
user { $title:
ensure => $ensure_real,
managehome => $managehome
ensure => $ensure_real,
managehome => $managehome
}

file { "${home}/bin":
Expand Down Expand Up @@ -176,9 +176,32 @@
group => $logingroup,
home => $home
}

User[$title] -> Class[$env_class]
}

file_line { 'source.profile.d':
path => "${home}/.bash_profile",
line => '[ -d .profile.d ] && source .profile.d/*.sh'
}

file_line { 'source.bashrc':
path => "${home}/.bashrc",
line => '[ -d .profile.d ] && [[ -z $PS1 ]] && source .profile.d/*.sh'
}

file { "${home}/.profile.d":
ensure => directory,
mode => '0755'
}

if $sshkey != '' {
ssh_authorized_key { $title:
ensure => $ensure_real,
key => $sshkey,
type => $sshkeytype,
user => $title,
require => User[$title]
}
}
}
}
}

0 comments on commit 7318de8

Please sign in to comment.