From d22caa7292634e836b19223772ef0589f545372f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 8 Jul 2018 22:31:07 +0200 Subject: [PATCH] setup versioning --- tasks/install.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index 07203c2..d2a35be 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -19,12 +19,15 @@ name: "{{ unifi_user }}" group: "{{ unifi_group }}" - - name: Setup working dir at '{{ unifi_base_dir }}' + - name: Setup directories file: - path: "{{ unifi_base_dir }}" + path: "{{ item }}" state: directory owner: "{{ unifi_user }}" group: "{{ unifi_group }}" + with_items: + - "{{ unifi_base_dir }}" + - "{{ unifi_base_dir }}/{{ unifi_version }}" become: True - name: Setup unifi version '{{ unifi_version }}' @@ -32,3 +35,9 @@ src: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip" dest: "{{ unifi_base_dir }}/{{ unifi_version }}" remote_src: yes + +- name: Create symlink for latest version + file: + src: "{{ unifi_base_dir }}/{{ unifi_version }}" + dest: "{{ unifi_base_dir }}/latest" + state: link