Skip to content

Instantly share code, notes, and snippets.

@Yatharth0045
Created April 21, 2019 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yatharth0045/e3537c453248092bbec37989126107a8 to your computer and use it in GitHub Desktop.
Save Yatharth0045/e3537c453248092bbec37989126107a8 to your computer and use it in GitHub Desktop.
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