27 lines
739 B
YAML
27 lines
739 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: 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
|