16 lines
506 B
YAML
16 lines
506 B
YAML
---
|
|
- name: check whether {{repo}} exists
|
|
shell: cd {{root_dir}} && [ -d {{repo}}/.svn ]
|
|
ignore_errors: true
|
|
register: repo_exists
|
|
|
|
- name: checkout {{repo}} from svn
|
|
shell: cd {{root_dir}} && rm -rf {{repo}} && svn checkout {{svn_opt}} {{svn_url}} {{repo}} &>> {{ansible_env.SSH_TTY}}
|
|
when: repo_exists is failed
|
|
|
|
- name: update {{repo}} from svn
|
|
shell: cd {{root_dir}}/{{repo}} && svn update {{svn_opt}} &>> {{ansible_env.SSH_TTY}}
|
|
register: update_result
|
|
when: repo_exists is succeeded
|
|
|