From a5f002bc4244609470d32a3ff3e5f908a2494bd9 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 18 Jun 2023 20:20:45 +0200 Subject: [PATCH] fix intel cpu's problem with Panel Self Refresh --- roles/system/handlers/main.yml | 4 ++++ roles/system/tasks/main.yml | 21 ++++++++++++++++++++- roles/system/templates/.gitconfig.j2 | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 roles/system/handlers/main.yml diff --git a/roles/system/handlers/main.yml b/roles/system/handlers/main.yml new file mode 100644 index 0000000..976aa5f --- /dev/null +++ b/roles/system/handlers/main.yml @@ -0,0 +1,4 @@ +- name: update grub + become: true + command: + cmd: update-grub diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 80b5f20..4252d23 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -19,49 +19,68 @@ - telegram-desktop - wget - vlc - - nextcloud-desktop + # - nextcloud-desktop + - name: Install .gitconfig template: src: "{{ role_path }}/templates/.gitconfig.j2" dest: ~/.gitconfig + - name: Create repos directory file: path: ~/repos state: directory + - name: Download Hashicorp signing key become: true apt_key: keyserver: keyserver.ubuntu.com id: "798AEC654E5C15428C8E42EEAA16FCBCA621E701" keyring: /etc/apt/trusted.gpg.d/hashicorp.gpg + - name: Install Hashicorp repository become: true apt_repository: repo: "deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp.gpg] https://apt.releases.hashicorp.com bookworm main" register: apt_repository + - name: Update APT cache become: true apt: update_cache: true when: apt_repository.changed + - name: Create ssh config directory file: path: ~/.ssh state: directory mode: 0700 + - name: Copy ssh config copy: src: "{{ role_path }}/files/ssh_config" dest: ~/.ssh/config mode: 0600 + - name: Copy systemd ssh-agent service become: true template: src: "{{ role_path }}/templates/ssh-agent.service.j2" dest: /etc/systemd/user/ssh-agent.service + - name: Enable ssh-agent service systemd: name: ssh-agent enabled: true scope: user state: started + +- name: Edit grub to disable Panel Self Refresh + become: true + ini_file: + path: /etc/default/grub + section: null + option: "GRUB_CMDLINE_LINUX_DEFAULT" + value: '"quiet splash i915.enable_psr=0"' + no_extra_spaces: true + notify: update grub diff --git a/roles/system/templates/.gitconfig.j2 b/roles/system/templates/.gitconfig.j2 index ba5e903..bd339c2 100644 --- a/roles/system/templates/.gitconfig.j2 +++ b/roles/system/templates/.gitconfig.j2 @@ -2,6 +2,6 @@ email = {{ email }} name = {{ full_name }} [core] - editor = /usr/bin/nvim + editor = nvim [init] defaultBranch = master