Fixed small log2ram size.
authorLuke Hoersten <luke@hoersten.org>
Fri, 01 May 2020 17:58:26 -0500
changeset 13 c74df4bbd49d
parent 12 80a6e9af6aa9
child 14 47937f95ac26
Fixed small log2ram size.
rpi-base/defaults/main.yaml
rpi-base/handlers/main.yaml
rpi-base/tasks/main.yml
--- a/rpi-base/defaults/main.yaml	Fri May 01 16:21:21 2020 -0500
+++ b/rpi-base/defaults/main.yaml	Fri May 01 17:58:26 2020 -0500
@@ -2,7 +2,9 @@
 
 rpi_base_enable_wifi: True
 rpi_base_timezone: "America/Chicago"
+rpi_base_log_size: "100M"
 rpi_base_apt_packages:
+  - "avahi-daemon"
   - "log2ram"
   - "fail2ban"
   - "unattended-upgrades"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpi-base/handlers/main.yaml	Fri May 01 17:58:26 2020 -0500
@@ -0,0 +1,5 @@
+---
+
+- name: restart log2ram service
+  systemd: name="log2ram" state="restarted" daemon_reload="yes"
+  become: yes
--- a/rpi-base/tasks/main.yml	Fri May 01 16:21:21 2020 -0500
+++ b/rpi-base/tasks/main.yml	Fri May 01 17:58:26 2020 -0500
@@ -17,6 +17,14 @@
   become: yes
   apt_repository: repo="deb http://packages.azlux.fr/debian/ buster main"
 
+- name: configure log2ram disk size
+  become: yes
+  lineinfile:
+    path: "/etc/log2ram.conf"
+    regexp: "^SIZE="
+    line: "SIZE={{rpi_base_log_size}}"
+  notify: restart log2ram service
+
 - name: set timezone
   become: yes
   timezone: name="{{rpi_base_timezone}}"
@@ -49,7 +57,7 @@
   become: yes
   authorized_key: user="{{admin_user_name}}" key="https://github.com/{{github_user}}.keys"
 
-- name: authorize pi ssh keys
+- name: authorize ssh keys
   become: yes
   authorized_key: user="{{ansible_user}}" key="https://github.com/{{github_user}}.keys"