Skip to content

Commit

Permalink
set java path in upstart script
Browse files Browse the repository at this point in the history
  • Loading branch information
jBarz committed Feb 9, 2018
1 parent f39ff97 commit e062922
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ansible/roles/java-base/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions ansible/roles/jenkins-worker/templates/upstart.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e062922

Please sign in to comment.