xoxys.unifi/tasks/install.yml

35 lines
833 B
YAML
Raw Normal View History

2018-07-08 16:50:35 +00:00
---
- block:
- name: Install requirements
package:
name: "{{ item }}"
state: present
with_items:
- "java-{{ unifi_openjdk_version }}-openjdk"
- unzip
- wget
- name: Create group '{{ unifi_group }}'
group:
name: "{{ unifi_group }}"
state: present
- name: Create user '{{ unifi_user }}'
user:
name: "{{ unifi_user }}"
group: "{{ unifi_group }}"
- name: Setup working dir at '{{ unifi_base_dir }}'
file:
path: "{{ unifi_base_dir }}"
state: directory
owner: "{{ unifi_user }}"
group: "{{ unifi_group }}"
become: True
- name: Setup unifi version '{{ unifi_version }}'
unarchive:
src: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip"
dest: "{{ unifi_base_dir }}/{{ unifi_version }}"
remote_src: yes