aboutsummaryrefslogtreecommitdiff
path: root/openbsd-laptop.yml
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2020-09-27 09:13:08 -0400
committerMitch Riedstra <mitch@riedstra.us>2020-09-27 09:13:08 -0400
commit98f94ee922ff96014984bba46300f9fe18620d31 (patch)
tree749e4af6f48874a94f575365957ac331866a09cc /openbsd-laptop.yml
parent06e9e3912424e6d259d9cceea9ab6ffad3b9de5d (diff)
downloaddotfiles-98f94ee922ff96014984bba46300f9fe18620d31.tar.gz
dotfiles-98f94ee922ff96014984bba46300f9fe18620d31.tar.xz
Create a minimal ansible playbook for the laptop
Diffstat (limited to 'openbsd-laptop.yml')
-rw-r--r--openbsd-laptop.yml82
1 files changed, 82 insertions, 0 deletions
diff --git a/openbsd-laptop.yml b/openbsd-laptop.yml
new file mode 100644
index 0000000..81d739b
--- /dev/null
+++ b/openbsd-laptop.yml
@@ -0,0 +1,82 @@
+---
+- name: Setup OpenBSD Laptop
+ hosts: localhost
+ vars:
+ ansible_connection: local
+ openbsd_staff:
+ - mitch
+ openbsd_sysctls:
+ - line: kern.maxproc=32768
+ regexp: ^kern.maxproc
+ - line: kern.maxfiles=65535
+ regexp: ^kern.maxfiles
+ - line: kern.bufcachepercent=40
+ regexp: ^kern.bufcachepercent
+ openbsd_doas: |
+ permit nopass :wheel as root
+ openbsd_packages:
+ - git
+ - ansible
+ - vim
+ - firefox
+ - thunderbird
+ - i3
+ - xfce
+ - i3
+ - dmenu
+ - password-store
+ - pass-otp
+ - gpa
+ - htop
+ - slock
+ - bash
+ - feh
+ - rsync
+ - go
+ - xfce4-screenshooter
+ - okular
+ - shellcheck
+ - redshift
+ - postgresql-server
+ - vlc
+ - rtorrent
+ - mktorrent
+ - wget
+ - pwgen
+ - xdotool
+ - runit
+ - tree
+ - noto-emoji
+ - ncdu
+ tasks:
+ # TODO: login.conf staff group bumped limits
+ - name: Enable apmd
+ lineinfile:
+ dest: /etc/rc.conf.local
+ line: apmd_flags=-A
+ regexp: '^apmd_flags='
+ - name: Install packages
+ openbsd_pkg:
+ name: '{{openbsd_packages}}'
+ state: present
+ - name: Add specified users to staff
+ shell: |
+ #!/bin/sh
+ {% for user in openbsd_staff %}
+ usermod -G staff {{user}}
+ {% endfor %}
+ - name: Write doas configuration
+ copy:
+ content: '{{openbsd_doas}}'
+ dest: /etc/doas.conf
+ - name: Tune sysctls
+ lineinfile:
+ dest: /etc/sysctl.conf
+ regexp: '{{item.regexp}}'
+ line: '{{item.line}}'
+ loop: '{{openbsd_sysctls}}'
+
+
+
+
+