Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 965 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 965 Bytes

desc

  1. 部署一个tar.gz的的jdk
  2. 添加环境变量
  3. 使用keytooljdk导入证书

examples

# vars
jdk_certs:
  - cert_url: 172.16.1.1
    cert_port: 636
    cert_alias: ldap.domain.com
  - cert_path: '/tmp/k8s-root-ca.pem'
    cert_alias: 'k8s.k8s11.com'

- hosts: 10.111.111.110
  remote_user: root
  roles:
    - { role: jdk_install, jdk_packet: /data/apps/soft/ansible/jdk-8u281-linux-x64.tar.gz }

installing openjdk without env.sh

- hosts: dev_new_jenkins
  roles:
  - role: jdk_install
    jdk_app_name: 'java-17'
    jdk_profile: ''
    jdk_install_dir: '/opt/server'
    jdk_packet:  /data/apps/soft/ansible/jdk/microsoft-jdk-17.0.8.1-linux-x64.tar.gz

问题

理论上来说,这个role很简单,似乎可以同时安装nodejs类的包,但是实际上是不行的。比如在安装阶段,creates参数只是针对java的。

改改当然可以通用些,但是也同时带来复杂性。