I have a great need to modify the .bash_profile for individual users. I am working on a pull request but would like feedback on how to implement such a feature.
I was thinking about adding a key in the bashrc::users variable called 'bashprofile' and then have the puppet template iterate over all of the key/pair values. Of course, there wouldn't be any kind of sanity checking doing it this way.
bashrc::users:
- username: "SomeUserName"
managelocalbashrc: true
homedirectory: "/home/SomeUserName"
bashprofile:
export:
- JAVA_HOME: /foo/bar
- JBOSS_HOME: /fee/bar
templates/skel/profile.erb additions:
<% @key['bashprofile']['export'].each do |k| -%>
export <%= k %>=<%= k.keys %> value:
<% end -%>
This PR gives an example of what I'm thinking.
This module comes up as the first or second hit when searching for 'puppet module bash_profile'.
Thoughts?
I have a great need to modify the .bash_profile for individual users. I am working on a pull request but would like feedback on how to implement such a feature.
I was thinking about adding a key in the bashrc::users variable called 'bashprofile' and then have the puppet template iterate over all of the key/pair values. Of course, there wouldn't be any kind of sanity checking doing it this way.
templates/skel/profile.erb additions:
This PR gives an example of what I'm thinking.
This module comes up as the first or second hit when searching for 'puppet module bash_profile'.
Thoughts?