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:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
- name: generate locale
|
||||
locale_gen: name="{{locale}}" state=present
|
||||
tags:
|
||||
- locale
|
||||
|
||||
- name: set environment file
|
||||
template:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
13
roles/raspberry/tasks/timedate.yml
Normal file
13
roles/raspberry/tasks/timedate.yml
Normal 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
|
||||
Reference in New Issue
Block a user