various updates
authorLuke Hoersten <luke@hoersten.org>
Sun, 07 Jun 2020 21:55:46 -0500
changeset 34 ecbdaed7f151
parent 33 ad75fc2d2853
child 35 87e0c39ac37d
various updates
homebridge/defaults/main.yaml
homebridge/tasks/main.yaml
rpi-base/tasks/main.yml
transmission/defaults/main.yaml
transmission/tasks/main.yaml
--- a/homebridge/defaults/main.yaml	Sat May 30 20:57:42 2020 -0500
+++ b/homebridge/defaults/main.yaml	Sun Jun 07 21:55:46 2020 -0500
@@ -1,6 +1,7 @@
 ---
 
 homebridge_user: "homebridge"
+homebridge_groups: "video"
 homebridge_dir: "/home/{{homebridge_user}}"
 homebridge_restart_sec: "10"
 
--- a/homebridge/tasks/main.yaml	Sat May 30 20:57:42 2020 -0500
+++ b/homebridge/tasks/main.yaml	Sun Jun 07 21:55:46 2020 -0500
@@ -7,7 +7,7 @@
     comment: "Homebridge"
     shell: "/bin/false"
     home: "{{homebridge_dir}}"
-    groups: "video,spi,i2c,gpio,bluetooth"
+    groups: "{{homebridge_groups}}"
     move_home: yes
   notify: restart homebridge service
 
--- a/rpi-base/tasks/main.yml	Sat May 30 20:57:42 2020 -0500
+++ b/rpi-base/tasks/main.yml	Sun Jun 07 21:55:46 2020 -0500
@@ -17,14 +17,6 @@
   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}}"
@@ -41,7 +33,15 @@
   become: yes
   apt: name="{{rpi_base_apt_packages}}" state="latest"
 
-- name: install fail2ban config
+- 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: configure fail2ban
   become: yes
   copy: src="jail.local" dest="/etc/fail2ban/jail.local"
 
--- a/transmission/defaults/main.yaml	Sat May 30 20:57:42 2020 -0500
+++ b/transmission/defaults/main.yaml	Sun Jun 07 21:55:46 2020 -0500
@@ -1,6 +1,6 @@
 ---
 
-transmission_config: "/var/lib/transmission-daemon/info/settings.json"
+transmission_config: "/etc/transmission-daemon/settings.json"
 transmission_port: "9091"
 transmission_passwd: "transmission"
 transmission_download_dir: "/var/lib/transmission-daemon/downloads"
--- a/transmission/tasks/main.yaml	Sat May 30 20:57:42 2020 -0500
+++ b/transmission/tasks/main.yaml	Sun Jun 07 21:55:46 2020 -0500
@@ -16,6 +16,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "rpc-whitelist":'
     line: '    "rpc-whitelist": "127.0.0.1,192.168.*.*",'
+    insertafter: ",$"
   notify: restart transmission service
 
 - name: config umask
@@ -24,6 +25,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "umask":'
     line: '    "umask": 2,'
+    insertafter: ",$"
   notify: restart transmission service
 
 - name: config port
@@ -32,6 +34,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "rpc-port":'
     line: "    \"rpc-port\": {{transmission_port}},"
+    insertafter: ",$"
   notify: restart transmission service
 
 # the password is hashed at start of server so this always changes
@@ -41,6 +44,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "rpc-password":'
     line: "    \"rpc-password\": \"{{transmission_passwd}}\","
+    insertafter: ",$"
   changed_when: false
 
 - name: config download dir
@@ -49,6 +53,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "download-dir":'
     line: "    \"download-dir\": \"{{transmission_download_dir}}\","
+    insertafter: ",$"
   notify: restart transmission service
 
 - name: config disable seeding
@@ -57,6 +62,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "idle-seeding-limit":'
     line: "    \"idle-seeding-limit\": 0,"
+    insertafter: ",$"
   notify: restart transmission service
 
 - name: config disable seeding
@@ -65,6 +71,7 @@
     path: "{{transmission_config}}"
     regexp: '^    "idle-seeding-limit-enabled":'
     line: "    \"idle-seeding-limit-enabled\": true,"
+    insertafter: ",$"
   notify: restart transmission service
 
 - name: start transmission service