26 lines
625 B
YAML
26 lines
625 B
YAML
---
|
|
- name: check the version installed
|
|
stat:
|
|
path: '{{ cerebro_bin_dir }}/release'
|
|
register: st
|
|
tags: cerebro
|
|
|
|
- name: download archive
|
|
unarchive:
|
|
src: '{{ cerebro_url }}'
|
|
dest: '{{ cerebro_bin_dir }}'
|
|
owner: root
|
|
group: root
|
|
remote_src: true
|
|
when: not st.stat.exists or not 'cerebro-{}'.format(cerebro_version) == st.stat.lnk_source|basename
|
|
tags: cerebro
|
|
|
|
- name: enable new version
|
|
file:
|
|
src: '{{ cerebro_bin_dir }}/cerebro-{{ cerebro_version }}'
|
|
dest: '{{ cerebro_bin_dir }}/release'
|
|
owner: root
|
|
group: root
|
|
state: link
|
|
notify: restart cerebro
|
|
tags: cerebro
|