aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-02-19 13:52:56 +0100
committerbinary <me@rgoncalves.se>2021-02-19 13:52:56 +0100
commit2a0a4d8e2c97c1a3668c82a816dbd0b3129da3d2 (patch)
treec3cb30a81e26979c7b9d842cb33a8abf9b57604d /roles
parentf711c771a43bd8e2c81fcdf7f463c1776f609021 (diff)
downloadinfrastructure-2a0a4d8e2c97c1a3668c82a816dbd0b3129da3d2.tar.gz
Fix blockinfile and use loop for system wide config. files
Diffstat (limited to 'roles')
-rw-r--r--roles/workstation/tasks/_openbsd.yml21
-rw-r--r--roles/workstation/tasks/packages.yml35
l---------roles/workstation/templates/etc-apm-hibernate1
-rwxr-xr-xroles/workstation/templates/etc-apm-suspend3
4 files changed, 19 insertions, 41 deletions
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
remember that computers suck.