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

openhab 2.5 on raspi4

This commit is contained in:
Christian Schnidrig
2020-01-01 20:34:53 +01:00
parent caf4dcd77a
commit 0c652dfbd2
30 changed files with 203 additions and 185 deletions

View File

@@ -1,9 +1,7 @@
---
- name: restart ntp
service: name=ntp state=restarted
- name: timedatectl
command: timedatectl set-ntp true
- name: update exportfs
shell: exportfs -rav

View File

@@ -13,8 +13,6 @@
- name: generate locale
locale_gen: name="{{locale}}" state=present
tags:
- locale
- name: set environment file
template:

View File

@@ -1,10 +1,17 @@
---
- include: packages.yml
- include: ntp.yml
- include: timezone.yml
- include: locale.yml
tags:
- packages
- include: timedate.yml
tags:
- ntp
# - include: locale.yml
# tags:
# - locale
- include: skeleton.yml
tags:
- skeleton

View File

@@ -2,25 +2,15 @@
- name: ensure packages are installed
apt:
pkg: "{{item}}"
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
with_items:
pkg:
- apt-transport-https
- ntp
- tmux
- python-pip
- python3-pip
- git
- multitail
- python3-requests
tags:
- packages
- python3-websocket
update_cache: "{{apt_config.update_cache}}"
cache_valid_time: "{{apt_config.cache_valid_time}}"
- name: install python 3 modules with pip
pip:
name: websocket-client
executable: pip3
tags:
- packages

View File

@@ -3,17 +3,8 @@
- name: alias
copy:
src: alias
dest: "/home/pi/.alias"
dest: "/home/pi/.bash_aliases"
owner: pi
group: pi
mode: "u=rw,g=r,o=r"
tags:
- alias
- name: update bashrc
lineinfile:
dest=/home/pi/.bashrc
line="test -s ~/.alias && . ~/.alias"
tags:
- alias

View File

@@ -0,0 +1,13 @@
---
- name: update ntp.conf
lineinfile:
dest: "/etc/systemd/timesyncd.conf"
regexp: '^#*\s*NTP='
line: "NTP={{ ntp | join(' ') }}"
notify: timedatectl
- name: "set Timezone"
timezone:
name: "{{ timezone }}"
notify: timedatectl