Can't find java
svanschalkwyk opened this issue · 3 comments
This shows that the jre has been installed. Yet when I try to find java on the GCE, it is not found.
Tried on Debian-8/9, Ubuntu 16.04 etc. etc.
TASK [ansible-role-java : Ensure Java is installed.] ***************************
task path: /home/steph/Ansible/repos/compute-video-demo-ansible/roles/ansible-role-java/tasks/setup-Debian.yml:2
ok: [104.154..42] => (item=[u'openjdk-8-jdk']) => {"cache_update_time": 1500411978, "cache_updated": false, "changed": false, "failed": false, "item": ["openjdk-8-jdk"]}
ok: [35.188..104] => (item=[u'openjdk-8-jdk']) => {"cache_update_time": 1500411978, "cache_updated": false, "changed": false, "failed": false, "item": ["openjdk-8-jdk"]}
How are you trying to test this, and if it's on GCE, what kind of instance/state are you using? I haven't encountered any issues when installing on Docker locally, in VirtualBox VMs, nor in DigitalOcean droplets or AWS EC2 instances...
If Ansible is reporting ok
, then it's seeing the package installed (openjdk-8-jdk
). What's the output of java -version
?
@svanschalkwyk - If you're passing -c local
, that means it will try running the playbook locally, not on your remote server. Therefore it's only doing stuff locally.
You need to remove -c local
, and make sure your site.yml
playbook uses a hosts
set that's defined in your ansible_hosts
file.
It might be good for you to ask these questions in the Ansible project Google Group (since it seems you may have a few more procedural questions for using Ansible / CLI options themselves): https://groups.google.com/forum/#!forum/ansible-project