Hi! I’m trying to use the environment parameter in order to set JAVA_HOME for a task . . .
I have this in my vars file:
wlst_env:
JAVA_HOME: /opt/software/java/jdk1.6.0_30
and this in my tasks file:
-
include_vars: main.yml
-
debug: var=wlst_env
-
name: Call undeploy script
command: “/opt/software/bea/wlserver_10.3/common/bin/wlst.sh /tmp/{{ wlst_repo }}/undeploy.py”
environment: wlst_env
The debug us saying that wlst_env is set correctly;
{
"var": {
"wlst_env": {
"JAVA_HOME": "/opt/software/java/jdk1.6.0_30"
}
},
.
.
.
"event": "Host OK"
}
but my “Call undeploy script” task fails with:
The JDK wasn’t found in directory /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64.
Please edit the startWebLogic.sh script so that the JAVA_HOME
variable points to the location of your JDK
Which makes me think that JAVA_HOME is not actually getting set! Any ideas what I’m doing wrong here?
Thanks a lot,
Guy