xoxys.zigbee2mqtt/tasks/prepare.yml

43 lines
1.0 KiB
YAML
Raw Normal View History

2018-11-11 02:11:10 +00:00
---
- block:
2019-08-06 19:45:39 +00:00
- name: Debug
command: ll /usr/local/bin
2019-08-06 19:47:50 +00:00
changed_when: False
2019-08-06 19:45:39 +00:00
register: __test
- debug:
msg: "{{ __test }}"
2019-03-09 14:12:58 +00:00
- name: Create local facts dir
file:
path: /etc/ansible/facts.d
state: directory
2018-11-11 02:11:10 +00:00
2019-03-09 14:12:58 +00:00
- name: Set current zigbee2mqtt version
set_fact:
2019-03-09 15:28:22 +00:00
zigbee2mqtt_current_version: "{{ (ansible_local.zigbee2mqtt | default (dict(version='0.0.0')))['version'] }}"
2018-11-11 02:11:10 +00:00
2019-03-09 14:12:58 +00:00
- debug:
msg: Current version is '{{ zigbee2mqtt_current_version }}'
2018-11-11 02:11:10 +00:00
2019-03-09 14:12:58 +00:00
- name: Install requirements
package:
name: "{{ item }}"
state: present
with_items:
- git
2019-03-09 15:46:09 +00:00
- rsync
2018-11-11 02:11:10 +00:00
2019-03-09 14:12:58 +00:00
- name: Create group '{{ zigbee2mqtt_group }}'
group:
name: "{{ zigbee2mqtt_group }}"
state: present
2018-11-11 02:11:10 +00:00
2019-03-09 14:12:58 +00:00
- name: Create user '{{ zigbee2mqtt_user }}'
user:
name: "{{ zigbee2mqtt_user }}"
group: "{{ zigbee2mqtt_group }}"
groups: "{{ zigbee2mqtt_secondary_groups }}"
2018-11-11 02:11:10 +00:00
become: True
become_user: root