mirror of
https://github.com/schnidrig/openhab-ansible
synced 2026-01-12 00:48:46 +01:00
openhab1
This commit is contained in:
32
roles/openhab/tasks/habmin.yml
Normal file
32
roles/openhab/tasks/habmin.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
|
||||
|
||||
- name: download HABmin
|
||||
get_url:
|
||||
url: https://github.com/cdjackson/HABmin/archive/master.zip
|
||||
dest: /root/habmin_master.zip
|
||||
mode: 0444
|
||||
tags:
|
||||
- habmin
|
||||
|
||||
|
||||
- name: unzip
|
||||
unarchive:
|
||||
remote_src: yes
|
||||
src: /root/habmin_master.zip
|
||||
dest: /usr/share/openhab/webapps/
|
||||
creates: "/usr/share/openhab/webapps/habmin"
|
||||
tags:
|
||||
- habmin
|
||||
|
||||
- name: rename
|
||||
command: creates="/usr/share/openhab/webapps/habmin" mv "/usr/share/openhab/webapps/HABmin-master" "/usr/share/openhab/webapps/habmin"
|
||||
tags:
|
||||
- habmin
|
||||
|
||||
- name: install addon
|
||||
command: creates="/usr/share/openhab/addons/org.openhab.io.habmin-1.8.0.jar" mv "/usr/share/openhab/webapps/habmin/addons/org.openhab.io.habmin-1.7.0-SNAPSHOT.jar" "/usr/share/openhab/addons/org.openhab.io.habmin-1.8.0.jar"
|
||||
tags:
|
||||
- habmin
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
- include: repo.yml
|
||||
- include: packages.yml
|
||||
- include: openhab.yml
|
||||
- include: habmin.yml
|
||||
- include: nfs.yml
|
||||
- include: mysql.yml
|
||||
|
||||
|
||||
|
||||
29
roles/openhab/tasks/mysql.yml
Normal file
29
roles/openhab/tasks/mysql.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
|
||||
- name: install mysql packages
|
||||
apt:
|
||||
pkg: "{{item}}"
|
||||
update_cache: "{{apt_config.update_cache}}"
|
||||
cache_valid_time: "{{apt_config.cache_valid_time}}"
|
||||
with_items:
|
||||
- mysql-server
|
||||
- python-mysqldb
|
||||
tags:
|
||||
- mysql
|
||||
|
||||
- name: Create openhab database
|
||||
mysql_db:
|
||||
name: openhab
|
||||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
|
||||
- mysql_user:
|
||||
name: openhab
|
||||
password: openhab
|
||||
priv: '*.*:ALL'
|
||||
state: present
|
||||
tags:
|
||||
- mysql
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
with_items:
|
||||
- "{{jdk}}"
|
||||
- openhab-runtime
|
||||
- sysstat
|
||||
tags:
|
||||
- packages
|
||||
- openhab
|
||||
|
||||
Reference in New Issue
Block a user