本 Role 用于安装 JRE/JDK。JDK=JRE+开发者工具包
运行本 Role,请确认符合如下的必要条件:
Items | Details |
---|---|
Operating system | CentOS7.x, Ubuntu, AmazonLinux |
Python 版本 | Python2 |
Python 组件 | |
Runtime |
本 Role 在语法不依赖其他 role 的变量,但程序运行时需要确保已经运行:common Role, 局里说明::
roles:
- {role: role_common, tags: "role_common"}
- {role: role_jdk, tags: "role_jdk"}
Items | Details | Format | 是否初始化 |
---|---|---|---|
jdk_version | "6","7","8","11","14" | 字符串 | 否 |
jdk_distribution | jdk,jre | 字符串 | 否 |
- name: example
hosts: all
become: yes
become_method: sudo
vars_files:
- vars/main.yml
role:
- {role: role_common, tags: "role_common"}
- {role: role_jdk, tags: "role_jdk"}
JDK=JRE+开发者工具包,JRE 全称是Java Runtime Environment,JDK全称是Java Development Kit
Headless is the same version than the latter without the support of keyboard, mouse and display systems. Hence it has less dependencies for runtime (no all Xorg display packages chain …) and it makes it more suitable for server applications.