xoxys.unifi/tasks/prepare.yml

34 lines
748 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:
- 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 }}"
2018-07-10 21:02:18 +00:00
- name: Setup local facts
2018-07-10 20:30:54 +00:00
file:
2018-07-10 21:02:18 +00:00
path: /etc/ansible/facts.d
2018-07-10 20:30:54 +00:00
state: directory
become: True