安装jdk环境,1.8或以上版本。
本人此处使用ansible-playbook方式安装
[root@tcontrol ansible]# ansible-playbook java18.yml
PLAY [local] ********************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [java : Include jdk 1.8 variables.] ***************************************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [Check if java local file is already configured.] **************************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [java : Create software directory.] ****************************************************************************************************************************************************************************************************
skipping: [172.16.96.24]
TASK [Download java file.] ******************************************************************************************************************************************************************************************************************
skipping: [172.16.96.24]
TASK [java : Confirm the existence of the installation directory.] **************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [Copy java file to agent.] *************************************************************************************************************************************************************************************************************
changed: [172.16.96.24]
TASK [Check if java remote soft link is already configured.] *******************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [Create java home dir.] ****************************************************************************************************************************************************************************************************************
changed: [172.16.96.24]
TASK [Create java dir soft link.] ***********************************************************************************************************************************************************************************************************
changed: [172.16.96.24]
TASK [java : Set JAVA_HOME if configured.] **************************************************************************************************************************************************************************************************
changed: [172.16.96.24]
TASK [java version] *************************************************************************************************************************************************************************************************************************
ok: [172.16.96.24]
TASK [java : debug] ************************************************************************************************************************