2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-11 16:38:47 +01:00
This commit is contained in:
Christian Schnidrig
2016-12-20 23:22:56 +01:00
parent 3a665afb54
commit 181acab247
6 changed files with 81 additions and 2 deletions

View File

@@ -15,7 +15,10 @@ e.g on a mac with sdcard reader that would be:
Insert sdcard into rasberry pi and boot.
### Enable sshd
sudo systemctl enable ssh
### Configure fixed ip address
Edit the file `/etc/dhcpcd.conf` and add the following lines (according to your network) and reboot.
@@ -38,5 +41,12 @@ Check/change other values in group_vars
ansible-playbook -i inventory raspi.yml
## performance tweaks
https://github.com/openhab/openhab/wiki/Hardware-FAQ
# install docker
https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/
curl -sSL https://get.docker.com | sh

View File

@@ -1,5 +1,10 @@
[defaults]
retry_files_enabled = False
vault_password_file = vault_password
[ssh_connection]
pipelining=True
allow_agent_forwarding_with_sudo=True
ssh_args = -o ForwardAgent=yes
#ssh_args = -A

View 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

View File

@@ -3,6 +3,8 @@
- include: repo.yml
- include: packages.yml
- include: openhab.yml
- include: habmin.yml
- include: nfs.yml
- include: mysql.yml

View 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

View File

@@ -8,6 +8,7 @@
with_items:
- "{{jdk}}"
- openhab-runtime
- sysstat
tags:
- packages
- openhab