composer update: fixed unless cmd by using -gt instead of >

(Command was not working on Ubuntu 16.04.)
Both Ubuntu's and RedHat's man pages of test list -gt, but not >
as their 'greater than' operator.
This commit is contained in:
Alexander Weidinger 2018-03-15 20:54:19 +01:00
parent 7c78eb5bd1
commit b1d5c18a56
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ install-composer:
update-composer:
cmd.run:
- name: "{{ install_file }} selfupdate"
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s")
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
- cwd: {{ php.local_bin }}
- env:
- HOME: {{ salt_user_home }}

View File

@ -49,7 +49,7 @@ install-composer:
update-composer:
cmd.run:
- name: "{{ install_file }} selfupdate"
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s")
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
- cwd: {{ php.lookup.pkgs.local_bin }}
- env:
- HOME: {{ salt_user_home }}