Robert Kaussow
be834a07ed
All checks were successful
continuous-integration/drone/push Build is passing
35 lines
886 B
YAML
35 lines
886 B
YAML
---
|
|
- block:
|
|
- name: Create local facts dir
|
|
file:
|
|
path: /etc/ansible/facts.d
|
|
state: directory
|
|
|
|
- name: Set current zigbee2mqtt version
|
|
set_fact:
|
|
zigbee2mqtt_current_version: "{{ (ansible_local.zigbee2mqtt | default (dict(version='0.0.0')))['version'] }}"
|
|
|
|
- debug:
|
|
msg: Current version is '{{ zigbee2mqtt_current_version }}'
|
|
|
|
- name: Install requirements
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items:
|
|
- git
|
|
- rsync
|
|
|
|
- name: Create group '{{ zigbee2mqtt_group }}'
|
|
group:
|
|
name: "{{ zigbee2mqtt_group }}"
|
|
state: present
|
|
|
|
- name: Create user '{{ zigbee2mqtt_user }}'
|
|
user:
|
|
name: "{{ zigbee2mqtt_user }}"
|
|
group: "{{ zigbee2mqtt_group }}"
|
|
groups: "{{ zigbee2mqtt_secondary_groups }}"
|
|
become: True
|
|
become_user: root
|