xoxys.zigbee2mqtt/tasks/prepare.yml
Robert Kaussow be834a07ed
All checks were successful
continuous-integration/drone/push Build is passing
add rsync as directory
2019-03-09 16:46:09 +01:00

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