Commit e34bce4a by 刘旋尧

ook

parent c0fd0d81
...@@ -2,6 +2,25 @@ ...@@ -2,6 +2,25 @@
- name: 先拉取代码 - name: 先拉取代码
git: repo={{ projects[project].repo }} dest={{ projects[project].dir }} accept_hostkey=yes clone=yes update=yes force=yes git: repo={{ projects[project].repo }} dest={{ projects[project].dir }} accept_hostkey=yes clone=yes update=yes force=yes
- name: 切换到master
command: "git checkout master"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 合并dev
command: "git merge dev"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 推送到master
command: "git push origin master"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 更新到指定版本 - name: 更新到指定版本
command: "git checkout {{ commit }}" command: "git checkout {{ commit }}"
args: args:
...@@ -18,7 +37,7 @@ ...@@ -18,7 +37,7 @@
- name: 生成需要刷新的cdn url列表 - name: 生成需要刷新的cdn url列表
template: src=urls.j2 dest=~/cdnurls owner=root group=root mode=0644 template: src=urls.j2 dest=~/cdnurls owner=root group=root mode=0644
when: projects[project].sync2qiniu is defined when: projects[project].sync2qiniu is defined
- name: 同步到qiniu - name: 同步到qiniu
command: "qshell cdnrefresh ~/cdnurls" command: "qshell cdnrefresh ~/cdnurls"
when: projects[project].sync2qiniu is defined when: projects[project].sync2qiniu is defined
\ No newline at end of file
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
- name: 执行hook - name: 执行hook
hosts: test hosts: test
become: yes become: yes
vars:
type: test
vars_files: vars_files:
- vars/main.yml - vars/main.yml
roles: roles:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment