Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Commit

Permalink
#1 java7 prereq playbook for services host
Browse files Browse the repository at this point in the history
  • Loading branch information
donsizemore committed Feb 22, 2016
1 parent 3d7c2c8 commit 2665e4f
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/playbooks/java7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- hosts: services
sudo: yes
roles:
- java7
71 changes: 71 additions & 0 deletions ansible/roles/java7/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
- name: make sure OpenJDK7 is installed
sudo: True
yum: name=java-1.7.0-openjdk state=latest
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure OpenJDK7 Devel is installed
sudo: True
yum: name=java-1.7.0-openjdk-devel state=present
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/java link is set to /etc/alternatives/java
sudo: True
file: src=/etc/alternatives/java path=/usr/bin/java state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/javac link is set to /etc/alternatives/javac
sudo: True
file: src=/etc/alternatives/javac path=/usr/bin/javac state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/javadoc link is set to /etc/alternatives/javadoc
sudo: True
file: src=/etc/alternatives/javadoc path=/usr/bin/javadoc state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/javah link is set to /etc/alternatives/javah
sudo: True
file: src=/etc/alternatives/javah path=/usr/bin/javah state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/javap link is set to /etc/alternatives/javap
sudo: True
file: src=/etc/alternatives/javap path=/usr/bin/javap state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/jar link is set to /etc/alternatives/jar
sudo: True
file: src=/etc/alternatives/jar path=/usr/bin/jar state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

- name: make sure the /usr/bin/jarsigner link is set to /etc/alternatives/jarsigner
sudo: True
file: src=/etc/alternatives/jarsigner path=/usr/bin/jarsigner state=link force=yes
when: ansible_distribution == "CentOS" and
ansible_distribution_major_version == "7"
tags:
- java

0 comments on commit 2665e4f

Please sign in to comment.