On Mon, Dec 31, 2012 at 08:51:55AM -0500, Adam Goucher wrote: > On 2012-12-31 7:21 AM, Sivaraman Viswanathan wrote: > > > >Hello All, > > > >I have written a manifest which will upgrade the JAVA to a recent > >version (ex: JDK 6u33 to JDK7) using exec type. The installation > >is nothing but untarring the tar.gz file into a predefined folder > >and setting the JAVA_HOME and PATH variables in the user's > >bash_profile file. > > > >1. Now I have to upgrade around 30 servers. Is there anyway that I > >can apply these manifests into the nodes from puppet master > >itself? > > Many of the examples that I found says that we have to login to > >the node and execute the command puppet agent update command. But > >doing this in all the managed nodes is tedious. > > Is there an easy way to accomplish this? > You could set up the agent to poll the master periodically. > > > >2. The bash_profile contains other text in them. How can we append > >these new variables (JAVA_HOME) into the existing file without > >changing the other parts of the file? > What I would look at is creating a .java_settings file that sets > your JAVA_* and have that sourced from the .profile. That way you > could have puppet manage that file in its entirety and not the > user's .profile. > > -adam
Yep You can also use the /etc/profile.d directory which is sourced in /etc/profile at least on Arch and Ubuntu. Best, Nikola -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
