Skip to content

Commit

Permalink
Merge pull request #14 from ansistrano/fix_bsd
Browse files Browse the repository at this point in the history
fix ls arguments for bsd distros
  • Loading branch information
ricardclau committed Sep 9, 2016
2 parents bc352b3 + 4296a33 commit ff92fd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
register: ansistrano_releases_path

- name: ANSISTRANO | Get number of releases
shell: echo `ls {{ ansistrano_releases_path.stdout }} -1t | wc -l`
shell: echo `ls -1t {{ ansistrano_releases_path.stdout }} | wc -l`
register: ansistrano_versions_count

- name: ANSISTRANO | Check if there is more than one release
Expand All @@ -13,11 +13,11 @@
when: ansistrano_versions_count.stdout|int <= 1

- name: ANSISTRANO | Get current release version
shell: echo `ls {{ ansistrano_releases_path.stdout }} -1t | head -n 1`
shell: echo `ls -1t {{ ansistrano_releases_path.stdout }} | head -n 1`
register: ansistrano_current_release_version

- name: ANSISTRANO | Get previous releases version
shell: echo `ls {{ ansistrano_releases_path.stdout }} -1t | head -n 2 | tail -n 1`
shell: echo `ls -1t {{ ansistrano_releases_path.stdout }} | head -n 2 | tail -n 1`
register: ansistrano_previous_release_version

- name: ANSISTRANO | Get release path
Expand Down

0 comments on commit ff92fd3

Please sign in to comment.