20 lines
530 B
YAML
20 lines
530 B
YAML
---
|
|
- block:
|
|
- name: Ensure service is up and running
|
|
systemd:
|
|
state: started
|
|
daemon_reload: yes
|
|
enabled: yes
|
|
name: unifi
|
|
|
|
- name: Set current version to custom fact
|
|
template:
|
|
src: etc/ansible/facts.d/unifi.fact.j2
|
|
dest: /etc/ansible/facts.d/unifi.fact
|
|
mode: 0644
|
|
owner: root
|
|
group: root
|
|
when: unifi_version is version(unifi_current_version, ">") or unifi_current_version is version('0.0.0', "=")
|
|
become: True
|
|
become_user: root
|