From 116000a6c2041f7de8f2133834d6d24ebacbbdea Mon Sep 17 00:00:00 2001 From: Mateusz Mojsiejuk Date: Fri, 6 Sep 2024 20:23:29 +0200 Subject: [PATCH] Add role for decreasing power consumption on pi:s --- README.md | 3 +++ roles/headless-powersave/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 roles/headless-powersave/tasks/main.yml diff --git a/README.md b/README.md index 1113714..4c98e0a 100644 --- a/README.md +++ b/README.md @@ -108,3 +108,6 @@ static_dhcp_clients: xx:xx:xx:xx:xx:xx: ip2 ``` ` + +## Headless powersave +Disables HDMI and on-device leds to save power diff --git a/roles/headless-powersave/tasks/main.yml b/roles/headless-powersave/tasks/main.yml new file mode 100644 index 0000000..f318afb --- /dev/null +++ b/roles/headless-powersave/tasks/main.yml @@ -0,0 +1,18 @@ +--- +- name: Disable HDMI + become: true + ansible.builtin.lineinfile: + path: /boot/config.txt + state: present + regexp: "dtoverlay=vc4-kms-v3d" + line: "dtoverlay=vc4-kms-v3d,nohdmi" + +- name: Disable Activity LED + become: true + ansible.builtin.lineinfile: + path: /boot/config.txt + state: present + line: "{{ item }}" + loop: + - "dtparam=act_led_trigger=none" + - "dtparam=act_led_activelow=on"