Skip to content

Commit

Permalink
Merge pull request #28 from dieterdemeyer/master
Browse files Browse the repository at this point in the history
Require user resource before doing anything with files in home folder
  • Loading branch information
fdammeke committed Jul 8, 2015
2 parents a5cbd09 + 4da337f commit 237fd56
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions manifests/localuser.pp
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,21 @@
}

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

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

file { "${home}/.profile.d":
ensure => directory,
mode => '0755'
mode => '0755',
require => User[$title]
}

}
Expand Down

0 comments on commit 237fd56

Please sign in to comment.