Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Playbook to show installation of java on different distributions.
---
# installing openjdk on diff OS.
# on debian
- apt:
name: openjdk-8-jdk
state: present
when: ansible_os_family == 'Debian'
# on redhat
- yum:
name: java-1.8.0-openjdk
state: present
when: ansible_os_family == 'RedHat'
# on freebsd
- pkgng:
name: openjdk8
state: present
when: ansible_os_family == 'FreeBSD'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.