From e062922b1c4e960a86565b9d12882dbf8dab3fd3 Mon Sep 17 00:00:00 2001 From: John Barboza Date: Fri, 9 Feb 2018 04:59:24 -0800 Subject: [PATCH] set java path in upstart script --- ansible/roles/java-base/tasks/main.yml | 5 ----- ansible/roles/jenkins-worker/templates/upstart.j2 | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/roles/java-base/tasks/main.yml b/ansible/roles/java-base/tasks/main.yml index ad7e92341..01bfe693c 100644 --- a/ansible/roles/java-base/tasks/main.yml +++ b/ansible/roles/java-base/tasks/main.yml @@ -46,11 +46,6 @@ dest: /home/iojs tags: java -- name: add jdk to PATH - when: os in "ubuntu1404" and arch == "ppc64" - shell: grep -s -q "export PATH=/home/iojs/jdk8u144-b01/bin:\$PATH" /home/iojs/.profile || echo "export PATH=/home/iojs/jdk8u144-b01/bin:\$PATH" >> /home/iojs/.profile - tags: java - # if this fails you want to check in vars/main.yml and add package name # as appropriate -- try to use generic os family if available. - name: install java diff --git a/ansible/roles/jenkins-worker/templates/upstart.j2 b/ansible/roles/jenkins-worker/templates/upstart.j2 index cf24adb1a..1f49c2b81 100644 --- a/ansible/roles/jenkins-worker/templates/upstart.j2 +++ b/ansible/roles/jenkins-worker/templates/upstart.j2 @@ -23,6 +23,11 @@ setgid iojs setuid iojs script + + if [ $(uname -i) = "ppc64le" ]; then + export PATH=/home/iojs/jdk8u144-b01/bin:$PATH; + fi + exec java -Xmx{{ server_ram|default('128m') }} \ -jar /home/{{ server_user }}/slave.jar -secret {{ secret }} \ -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp