From 2132d119b16d397604c3f1f3cf22f38c0b10c314 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 4 May 2019 17:25:31 +0200 Subject: [PATCH] add cmdline patch --- defaults/main.yml | 5 +++++ tasks/install.yml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 8a590d8..07f9e10 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -33,6 +33,11 @@ homeassistant_open_ports: -A INPUT -m state --state NEW -p tcp --dport {{ homeassistant_http_bind_port }} -j ACCEPT state: present +# override /boot/cmdline.txt with new content +# this can be necessary if you use searial hardware +# be careful! wrong config can make your system unusable! +# homeassistant_cmdline_content: "console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait" + homeassistant_nginx_vhost_enabled: False homeassistant_nginx_server: localhost homeassistant_nginx_vhost_dir: /etc/nginx/sites-available diff --git a/tasks/install.yml b/tasks/install.yml index b64607b..77af2f1 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -35,6 +35,12 @@ become_user: "{{ homeassistant_user }}" - block: + - name: Patch /boot/cmdline + copy: + content: "{{ homeassistant_cmdline_content }}" + dest: /boot/cmdline.txt + when: homeassistant_cmdline_content is defined + - name: Copy systemd unit file template: src: "etc/systemd/system/homeassistant.service.j2"