ansible-playbook deploy_cacert.yml -v --ask-pass --tags sandbox --extra-vars version=20150417
# deploy_cacert.yaml
- hosts: sbx_tomcat
gather_facts: no
sudo: yes
sudo_user: zapp
tags:
- sandbox
tasks:
- stat:
path: /usr/local/apps/jdk/jre/lib/security/cacerts_{{ version }}
register: st
- shell: >
curl -L -Ss --location-trusted --retry 5 --retry-delay 2 -udeployment:XXXXXX
-o /usr/local/apps/jdk/jre/lib/security/cacerts_{{ version }}
'http://1.util.inf.slv:8081/nexus/service/local/artifact/maven/redirect?r=security&g=com.java.cacerts&a=sandbox&v={{ version }}&p=cacerts'
when: not st.stat.exists
- file:
src: /usr/local/apps/jdk/jre/lib/security/cacerts_{{ version }}
dest: /usr/local/apps/jdk/jre/lib/security/cacerts
state: link
force: yes
很简单,下载cacerts然后做符号链接。对应host/version是变量。
阅读(1834) | 评论(0) | 转发(0) |