From 2a0a4d8e2c97c1a3668c82a816dbd0b3129da3d2 Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 19 Feb 2021 13:52:56 +0100 Subject: Fix blockinfile and use loop for system wide config. files --- roles/workstation/tasks/_openbsd.yml | 21 +++++++++++----- roles/workstation/tasks/packages.yml | 35 --------------------------- roles/workstation/templates/etc-apm-hibernate | 1 + roles/workstation/templates/etc-apm-suspend | 3 +++ 4 files changed, 19 insertions(+), 41 deletions(-) delete mode 100644 roles/workstation/tasks/packages.yml create mode 120000 roles/workstation/templates/etc-apm-hibernate create mode 100755 roles/workstation/templates/etc-apm-suspend (limited to 'roles/workstation') diff --git a/roles/workstation/tasks/_openbsd.yml b/roles/workstation/tasks/_openbsd.yml index 48630bb..0811ba2 100644 --- a/roles/workstation/tasks/_openbsd.yml +++ b/roles/workstation/tasks/_openbsd.yml @@ -10,7 +10,7 @@ - "{{ pkgs_common }}" - "{{ pkgs_openbsd }}" register: out - tags: ws_tag_pkgs + tags: pkgs - name: packages installation output debug: @@ -53,10 +53,14 @@ mode: 0644 state: directory -- name: generate Xorg configuration for intel gpu and screen tearing +- name: generate system wide configurations template: - src: etc-X11-xorg.conf.d-intel.conf - dest: /etc/X11/xorg.conf.d/intel.conf + src: "{{ item }}" + dest: "/{{ item | regex_replace('-', '/') }}" + loop: + - etc-X11-xorg.conf.d-intel.conf + - etc-apm-hibernate + - etc-apm-suspend - name: ensure sysctl configuration file exists file: @@ -74,7 +78,7 @@ kern.shminfo.shmseg=1024 kern.seminfo.semmns=4096 kern.seminfo.semmni=1024 - marker: "# memory - managed by Ansible" + marker: "# memory {mark} - managed by Ansible" - name: ensure sysctl process optimizations blockinfile: @@ -86,5 +90,10 @@ kern.bufcachepercent=90 kern.maxvnodes=262144 kern.somaxconn=2048 - marker: "# process - managed by Ansible" + marker: "# process - {mark} managed by Ansible" +- name: start and enable pcscd service + service: + name: pcscd + state: started + enabled: true diff --git a/roles/workstation/tasks/packages.yml b/roles/workstation/tasks/packages.yml deleted file mode 100644 index 4b38d4b..0000000 --- a/roles/workstation/tasks/packages.yml +++ /dev/null @@ -1,35 +0,0 @@ - -# -# - ---- - -- name: download common packages - package: name="{{ item }}" state=present - loop: - - zip unzip tar git curl wget syncthing - - qutebrowser firefox feh mpv cmus vlc - - i3 i3status bemenu - - go rust ansible - - emacs neovim htop - - gnupg zsh - - tor - ignore_errors: true - -- name: download openbsd packages - package: name="{{ item }}" state=present - loop: - - py3-pip py3-requests py3-jedi py3-neovim - - free automake clang-tools-extra - - wireguard-tools - - tor-browser torsocks - when: ansible_distribution == "OpenBSD" - ignore_errors: true - -- name: download archlinux packages - package: name="{{ item }}" state=present - loop: - - python-pip python-requests python-jedi python-neovim - - wireguard-dkms - when: ansible_distribution == "Archlinux" - ignore_errors: true diff --git a/roles/workstation/templates/etc-apm-hibernate b/roles/workstation/templates/etc-apm-hibernate new file mode 120000 index 0000000..a07e961 --- /dev/null +++ b/roles/workstation/templates/etc-apm-hibernate @@ -0,0 +1 @@ +etc-apm-suspend \ No newline at end of file diff --git a/roles/workstation/templates/etc-apm-suspend b/roles/workstation/templates/etc-apm-suspend new file mode 100755 index 0000000..9d36537 --- /dev/null +++ b/roles/workstation/templates/etc-apm-suspend @@ -0,0 +1,3 @@ +#!/bin/sh + +pkill -USR1 xidle -- cgit v1.2.3