Clean up group names. Fix mineos
This commit is contained in:
41
roles/geerlingguy.java/tasks/main.yml
Normal file
41
roles/geerlingguy.java/tasks/main.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
- name: Include OS-specific variables for Fedora or FreeBSD.
|
||||
include_vars: "{{ ansible_distribution }}.yml"
|
||||
when: ansible_distribution == 'FreeBSD' or ansible_distribution == 'Fedora'
|
||||
|
||||
- name: Include version-specific variables for CentOS/RHEL.
|
||||
include_vars: "RedHat-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
when: ansible_distribution == 'CentOS' or
|
||||
ansible_distribution == 'Red Hat Enterprise Linux' or
|
||||
ansible_distribution == 'RedHat'
|
||||
|
||||
- name: Include version-specific variables for Ubuntu.
|
||||
include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Include version-specific variables for Debian.
|
||||
include_vars: "{{ ansible_distribution|title }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Define java_packages.
|
||||
set_fact:
|
||||
java_packages: "{{ __java_packages | list }}"
|
||||
when: java_packages is not defined
|
||||
|
||||
# Setup/install tasks.
|
||||
- include_tasks: setup-RedHat.yml
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- include_tasks: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- include_tasks: setup-FreeBSD.yml
|
||||
when: ansible_os_family == 'FreeBSD'
|
||||
|
||||
# Environment setup.
|
||||
- name: Set JAVA_HOME if configured.
|
||||
template:
|
||||
src: java_home.sh.j2
|
||||
dest: /etc/profile.d/java_home.sh
|
||||
mode: 0644
|
||||
when: java_home is defined and java_home
|
||||
16
roles/geerlingguy.java/tasks/setup-Debian.yml
Normal file
16
roles/geerlingguy.java/tasks/setup-Debian.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 and
|
||||
# https://github.com/geerlingguy/ansible-role-java/issues/64
|
||||
- name: Ensure 'man' directory exists.
|
||||
file:
|
||||
path: /usr/share/man/man1
|
||||
state: directory
|
||||
recurse: true
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_version == '18.04'
|
||||
|
||||
- name: Ensure Java is installed.
|
||||
apt:
|
||||
name: "{{ java_packages }}"
|
||||
state: present
|
||||
11
roles/geerlingguy.java/tasks/setup-FreeBSD.yml
Normal file
11
roles/geerlingguy.java/tasks/setup-FreeBSD.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Ensure Java is installed.
|
||||
pkgng:
|
||||
name: "{{ java_packages }}"
|
||||
state: present
|
||||
|
||||
- name: ensure proc is mounted
|
||||
mount: name=/proc fstype=procfs src=proc opts=rw state=mounted
|
||||
|
||||
- name: ensure fdesc is mounted
|
||||
mount: name=/dev/fd fstype=fdescfs src=fdesc opts=rw state=mounted
|
||||
5
roles/geerlingguy.java/tasks/setup-RedHat.yml
Normal file
5
roles/geerlingguy.java/tasks/setup-RedHat.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Ensure Java is installed.
|
||||
package:
|
||||
name: "{{ java_packages }}"
|
||||
state: present
|
||||
Reference in New Issue
Block a user