ansible-role-cerebro/tasks/install.yml
2019-09-06 16:30:56 +02:00

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