xoxys.unifi/tasks/prepare.yml

36 lines
822 B
YAML
Raw Normal View History

2018-07-10 20:30:54 +00:00
---
- name: Set current unifi version
set_fact:
unifi_current_version: "{{ (ansible_local.unifi | default (dict(version='0.0.0')))['version'] }}"
- debug:
msg: Current version is '{{ unifi_current_version }}'
- block:
2019-01-09 21:13:40 +00:00
- name: Install requirements
package:
name: "{{ item }}"
state: present
2019-02-03 22:26:35 +00:00
loop:
2019-01-09 21:13:40 +00:00
- "java-{{ unifi_openjdk_version }}-openjdk"
- unzip
- wget
- pyOpenSSL
2018-07-10 20:30:54 +00:00
2019-01-09 21:13:40 +00:00
- name: Create group '{{ unifi_group }}'
group:
name: "{{ unifi_group }}"
state: present
2018-07-10 20:30:54 +00:00
2019-01-09 21:13:40 +00:00
- name: Create user '{{ unifi_user }}'
user:
name: "{{ unifi_user }}"
group: "{{ unifi_group }}"
2018-07-10 20:30:54 +00:00
2019-01-09 21:13:40 +00:00
- name: Setup local facts
file:
path: /etc/ansible/facts.d
state: directory
2018-07-10 20:30:54 +00:00
become: True
2019-01-09 21:13:40 +00:00
become_user: root