Add optional setting `java_args` to the master role
Change-Id: I20760f5dc9d2a7c085ad3995a99f438eab7823b4
diff --git a/README.rst b/README.rst
index df9f3d9..09d860b 100644
--- a/README.rst
+++ b/README.rst
@@ -70,6 +70,7 @@
jenkins:
master:
mode: EXCLUSIVE
+ java_args: -Xms256m -Xmx1g
# Do not manage config.xml from Salt, use UI instead
no_config: true
slaves:
diff --git a/jenkins/files/jenkins b/jenkins/files/jenkins
index 022627b..76e6f92 100644
--- a/jenkins/files/jenkins
+++ b/jenkins/files/jenkins
@@ -8,7 +8,7 @@
# arguments to pass to java
#JAVA_ARGS="-Xmx256m"
-JAVA_ARGS="-Djava.net.preferIPv4Stack=true -Djenkins.install.runSetupWizard=false" # make jenkins listen on IPv4 address and disable setup wizard
+JAVA_ARGS="{{ master.get('java_args', '') }} -Djava.net.preferIPv4Stack=true -Djenkins.install.runSetupWizard=false" # make jenkins listen on IPv4 address and disable setup wizard
PIDFILE=/var/run/jenkins/jenkins.pid