2
0
mirror of https://github.com/proffalken/ansible-openhab synced 2026-01-11 23:08:47 +01:00
Files
ansible-openhab-role/tasks/main.yml
2016-05-01 12:44:50 +01:00

60 lines
1.3 KiB
YAML

---
# tasks file for openhab
# include the distro-specific stuff
- name: Include the Debian config
include: debian.yml
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: Use the variables to build out the configuration file
template:
src: openhab.cfg.j2
dest: /etc/openhab/configurations/openhab.cfg
owner: openhab
group: openhab
- name: Copy in the items files
copy:
src: "{{ item }}"
dest: "/etc/openhab/configurations/items/"
owner: openhab
group: openhab
mode: 0644
with_fileglob:
- items/*
- name: Copy in the Sitemaps
copy:
src: "{{ item }}"
dest: "/etc/openhab/configurations/sitemaps/"
owner: openhab
group: openhab
mode: 0644
with_fileglob:
- sitemaps/*
- name: Copy in the Persistence Config
copy:
src: "{{ item }}"
dest: "/etc/openhab/configurations/persistence/"
owner: openhab
group: openhab
mode: 0644
with_fileglob:
- persistence/*
- name: Copy in the Rules
copy:
src: "{{ item }}"
dest: "/etc/openhab/configurations/rules/"
owner: openhab
group: openhab
mode: 0644
with_fileglob:
- rules/*
- name: Enable and start the OpenHAB service
service:
name: openhab
state: running
enabled: True