azavea / ansible-java

An Ansible role for installing Java.
Apache License 2.0
4 stars 15 forks source link

Java path doesn't exist on 32 bit os #7

Closed eneepo closed 8 years ago

eneepo commented 8 years ago

On 32 bit machines following error occurs:

TASK: [azavea.java | Set OpenJDK as the default] ****************************** 
failed: [192.168.111.50] => {"cmd": "/usr/bin/update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 50", "failed": true, "rc": 2}
stderr: update-alternatives: error: alternative path /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java doesn't exist

msg: update-alternatives: error: alternative path /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java doesn't exist

but the correct path should be:

/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java

I think architecture check on following line should fix the problem https://github.com/azavea/ansible-java/blob/develop/tasks/openjdk.yml#L15

Thanks