xoxys.unifi/tasks/prepare.yml

33 lines
758 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
2022-02-12 12:53:03 +00:00
loop: "{{ __unifi_deps }}"
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
2021-02-06 13:40:58 +00:00
mode: 0755
2018-07-10 20:30:54 +00:00
become: True
2019-01-09 21:13:40 +00:00
become_user: root