1 Star 0 Fork 1

昌宝/环境配置

forked from Allen/环境配置 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
deploy.yml 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
昌宝 提交于 2019-04-28 18:13 . update
- hosts: all
tasks:
- name: clear dir
shell: "rm -rf /root/deploy/*"
- name: unzip files
unarchive:
src: "package.zip"
dest: "/root/deploy/"
- name: set apps_name
shell: "ls /root/deploy/"
register: apps_name
- name: deploy uums pxfiles ntschool dbcenter
shell: "docker ps |grep -E '{{ item }}'|uniq |awk '{print $1}'| xargs -I {} docker cp /root/deploy/{{ item }}/. {}:/data/webapps/"
when: "'{{ item }}' == 'uums' or '{{ item }}' == 'pxfiles' or '{{ item }}' == 'ntschool' or '{{ item }}' == 'dbcenter'"
with_list: "{{ apps_name.stdout_lines }}"
- name: deploy other
shell: "docker ps |grep -E '{{ item }}'|uniq |awk '{print $1}'| xargs -I {} docker cp /root/deploy/{{ item }} {}:/data/webapps/"
when: "'{{ item }}' != 'uums' and '{{ item }}' != 'pxfiles' and '{{ item }}' != 'ntschool' and '{{ item }}' != 'dbcenter'"
with_list: "{{ apps_name.stdout_lines }}"
- name: restart
shell: "docker ps |grep -E '{{ item }}'|uniq |awk '{print $1}'| xargs -I {} docker restart {}"
with_list: "{{ apps_name.stdout_lines }}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/liuchangbao/envConfig.git
[email protected]:liuchangbao/envConfig.git
liuchangbao
envConfig
环境配置
master

搜索帮助