Skip to content

Commit

Permalink
Merge pull request #192 from rakshazi/master
Browse files Browse the repository at this point in the history
Implements #191
  • Loading branch information
ricardclau authored Dec 22, 2016
2 parents e46781d + 44583af commit faa5622
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Role Variables
ansistrano_svn_revision: "HEAD" # What revision from the repository to check out.
ansistrano_svn_username: "user" # SVN authentication username
ansistrano_svn_password: "Pa$$word" # SVN authentication password
ansistrano_svn_environment: {} # Dict with environment variables for svn tasks (https://docs.ansible.com/ansible/playbooks_environment.html)

# Variables used in the download deployment strategy
ansistrano_get_url: https://github.com/someproject/somearchive.tar.gz
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ansistrano_svn_branch: "trunk"
ansistrano_svn_revision: "HEAD"
ansistrano_svn_username: "user"
ansistrano_svn_password: "Pa$$word"
ansistrano_svn_environment: {}

## RSYNC push strategy
ansistrano_rsync_extra_params: ""
Expand Down
18 changes: 18 additions & 0 deletions example/my-playbook/deploy-svn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: Deploy example app to my-server.com
hosts: all
vars:
ansistrano_deploy_from: "{{ playbook_dir }}/../my-app"
ansistrano_deploy_to: "/tmp/my-app.com"
ansistrano_keep_releases: 3
ansistrano_deploy_via: svn
ansistrano_svn_repo: "https://svn.company.com/project" # Location of the svn repository
ansistrano_svn_branch: "trunk" # What branch from the repository to check out.
ansistrano_svn_revision: "HEAD" # What revision from the repository to check out.
ansistrano_svn_username: "user" # SVN authentication username
ansistrano_svn_password: "Pa$$word" # SVN authentication password
ansistrano_svn_environment: # Environment variables for svn tasks (https://docs.ansible.com/ansible/playbooks_environment.html)
LC_CTYPE: en_US.UTF-8
ANY_OTHER_ENV_VAR: "and its value"
roles:
- { role: carlosbuenosvinos.ansistrano-deploy }
2 changes: 2 additions & 0 deletions tasks/update-code/svn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
username: "{{ ansistrano_svn_username }}"
password: "{{ ansistrano_svn_password }}"
force: yes
environment: "{{ ansistrano_svn_environment }}"
register: ansistrano_svn_result_update

- name: ANSISTRANO | SVN | Register ansistrano_svn_result variable
Expand All @@ -26,4 +27,5 @@
password: "{{ ansistrano_svn_password }}"
export: yes
force: yes
environment: "{{ ansistrano_svn_environment }}"
register: ansistrano_svn_result_export

0 comments on commit faa5622

Please sign in to comment.