---

- name: Remove tmp and obsolete files
  file: path={{ item }} state=absent
  loop:
    - "{{ es_root_dir }}/tmp/elasticsearch-{{ es_version }}"
    - "{{ es_root_dir }}/tmp/elasticsearch-{{ es_version }}-linux-x86_64.tar.gz"
    - "{{ es_root_dir }}/archives/{{ es_current_version }}"
  tags: es
