2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-12 00:48:46 +01:00

initial commit

This commit is contained in:
Christian Schnidrig
2016-11-29 00:08:10 +01:00
parent 8643000910
commit 3a665afb54
30 changed files with 533 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
---
- include: repo.yml
- include: packages.yml
- include: openhab.yml
- include: nfs.yml

View File

@@ -0,0 +1,30 @@
---
- name: ensure packages are installed
apt:
pkg: "{{item}}"
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
with_items:
- nfs-common
- nfs-kernel-server
tags:
- packages
- nfs
- openhab
- name: update /etc/exports
lineinfile:
dest=/etc/exports
regexp="^{{item.mount_point}}\s.*"
line="{{item.mount_point}} {{item.options}}"
notify: update exportfs
with_items:
- { mount_point: "/etc/openhab", options: "*(rw,sync,no_subtree_check,all_squash)" }
tags:
- nfs
- nfsconfig
- openhab

View File

@@ -0,0 +1,20 @@
---
- name:
user:
name: openhab
groups: "dialout"
append: yes
tags:
- openhab
- user
- name: "configure systemd"
systemd:
name: openhab
daemon_reload: yes
enabled: true
state: started
tags:
- openhab

View File

@@ -0,0 +1,38 @@
---
- name: install main packages
apt:
pkg: "{{item}}"
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
with_items:
- "{{jdk}}"
- openhab-runtime
tags:
- packages
- openhab
- name: install bindings
apt:
pkg: "openhab-addon-binding-{{item}}"
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
with_items: "{{bindings}}"
tags:
- packages
- bindings
- openhab
- name: install persistence add ons
apt:
pkg: "openhab-addon-persistence-{{item}}"
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
with_items: "{{persistence}}"
tags:
- packages
- persistence
- openhab

View File

@@ -0,0 +1,18 @@
---
- name: install ppa key
apt_key: url=https://bintray.com/user/downloadSubjectPublicKey?username=openhab state=present
tags:
- repo
- openhab
- name: install openhab repo
apt_repository:
repo='deb http://dl.bintray.com/openhab/apt-repo stable main'
state=present
update_cache=yes
filename=openhab
tags:
- repo
- openhab