I'm trying to run a Gradle project with Ansible on a Linux server. If I go into the server and manually enter './gradlew clean deploy' I get no issues.
When I run it with Ansible, I'm getting a 'Can not find tools.jar' error. I have set my JAVA_HOME properly, because I used to get this error when entering manually.
I double checked my $JAVA_HOME, I confirmed that the directory was correct, I tried to do a shell using '&&' to cd into the dir and then run the command.
- name: go to directory and deploy
shell: ./gradlew clean deploy
args:
chdir: /DIR/I_NEED/TO_RUN_IN/