---

- name: Create archive directory
  file: path={{ pgweb_root_dir }}/archives/{{ pgweb_current_version }} state=directory mode=700
  tags: pgweb,pg

- name: Archive previous version
  copy: src={{ pgweb_root_dir }}/bin/pgweb dest={{ pgweb_root_dir }}/archives/{{ pgweb_current_version }} remote_src=True
  tags: pgweb,pg

