aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbsd-laptop.yml82
-rw-r--r--openbsd-pkgs.sh35
2 files changed, 82 insertions, 35 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}}'
+
+
+
+
+
diff --git a/openbsd-pkgs.sh b/openbsd-pkgs.sh
deleted file mode 100644
index 5d943a5..0000000
--- a/openbsd-pkgs.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-pkg_add -r \
- git \
- ansible \
- vim \
- firefox \
- thunderbird \
- i3 \
- xfce \
- i3 \
- dmenu \
- password-store \
- pass-otp \
- gpa \
- htop \
- slock \
- bash \
- feh \
- rsync \
- go \
- xfce4-screenshoooter \
- okular \
- shellcheck \
- redshift \
- postgresql-server \
- vlc \
- rtorrent \
- mktorrent \
- wget \
- pwgen \
- xdotool \
- runit \
- tree \
-