I am trying to install / install tomcat7 using a puppet.
I did not find a module that allows me to configure the maximum heap memory.
So, I'm trying to enter the line "CATALINA_OPTS = -Xmx2048m" in the file catalina.sh.
I'm not quite sure what the best way to do this. I looked at the file_line resource, but I don’t know how to insert it in the middle of the catalina.sh file.
Any suggestions are welcome.
Update: Some people suggested templates, but I do not need to parameterize anything. I want to be able to take any catalina.sh file that installs tomcat and enter a line into it. If I used templates or replaced the modified copy file, then the next tomcat that I install may have a different catalina.sh file, and this will overwrite the new file format.
Maybe I need a way to insert a row AFTER another row. I believe that I can insert "CATALINA_OPTS =" immediately after the line #! / Bin / bash. Is it possible?
source
share