From df12bcdf184c3efd497e113b47eca8fe3011a22f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 14 Sep 2018 09:48:18 +0100 Subject: [PATCH] Add laptop config --- dotfiles.yml | 3 +++ {modules/devices/files => files}/tlp.conf | 0 tasks/laptop.yml | 24 +++++++++++++++++++++++ 3 files changed, 27 insertions(+) rename {modules/devices/files => files}/tlp.conf (100%) create mode 100644 tasks/laptop.yml diff --git a/dotfiles.yml b/dotfiles.yml index 18e4c44..0fd868c 100644 --- a/dotfiles.yml +++ b/dotfiles.yml @@ -17,5 +17,8 @@ - import_tasks: tasks/yaourt.yml - import_tasks: tasks/fonts.yml - import_tasks: tasks/autostart.yml + - import_tasks: tasks/dabapps.yml when: ansible_fqdn == "TOO-Work" + - import_tasks: tasks/laptop.yml + when: ansible_fqdn == "TOO-Laptop" diff --git a/modules/devices/files/tlp.conf b/files/tlp.conf similarity index 100% rename from modules/devices/files/tlp.conf rename to files/tlp.conf diff --git a/tasks/laptop.yml b/tasks/laptop.yml new file mode 100644 index 0000000..fd29e14 --- /dev/null +++ b/tasks/laptop.yml @@ -0,0 +1,24 @@ +- name: "Install power-saving stuff" + aur: + use: yay + skip_installed: true + name: "{{ item }}" + become: true + become_user: aur_builder + with_items: + - ethtool + - smartmontools + - tlp + +- name: Enable TLP services + service: + name: "{{ item }}" + enabled: true + with_items: + - tlp + - tlp-sleep + +- copy: + src: ./files/tlp.conf + dest: /etc/default/tlp + mode: 0644