Skip to content

Instantly share code, notes, and snippets.

@viq
viq / metronome.kdump
Created September 27, 2015 19:30
Metronome daemonize kdump
This file has been truncated, but you can view the full file.
28868 EMUL "native"
28868 ktrace RET ktrace 0
28868 ktrace CALL execve(0x7f7ffffdbbe5,0x7f7ffffdbae0,0x7f7ffffdbaf0)
28868 ktrace NAMI "/usr/local/sbin/metronome"
28868 ktrace NAMI "/usr/local/bin/lua51"
28868 lua51 NAMI "/usr/libexec/ld.so"
28868 EMUL "native"
28868 lua51 RET execve 0
28868 lua51 CALL issetugid()
28868 lua51 RET issetugid 0
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent -%}
{% for auth in user['ssh_auth'] -%}
{{ auth }}
{% endfor -%}
{% endfor -%}
@viq
viq / authorized_keys.sample
Last active April 29, 2020 09:16
Restrict what ssh key can do while allowing backup of whole machine via rsync to a normal user
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="/usr/local/sbin/restrict-ssh" ssh-rsa AAAAB3...VcuVQ== BackupPC
postgresql-server:
pkg.installed:
- name: {{ salt['pillar.get']('packages:postgres') }}
service:
- name: {{ salt['pillar.get']('services:postgres') }}
- running
- enable: True
- require:
- pkg: postgresql-server
- file: postgresql-server
{% from "base/syslog/syslog.jinja" import syslog with context %}
include:
- base.example-ca
syslog-ng:
service:
- dead
- enable: False
rsyslog:
mysql:
{% if salt['pillar.get']('mysql:install_method', 'package') == 'package' %}
pkg.installed
{% else %}
git:
- latest
- name: git://path
cmd:
- wait
- name: ./install_mysql
es-requirements:
pkg.installed:
- pkgs:
- {{ salt['pillar.get']('packages:jre7') }}
elasticsearch:
pkgrepo.managed:
- humanname: ElasticSearch repository for {{ salt['pillar.get']('logstash:es_ver') }}.x packages
{% if grains['os_family'] == 'RedHat' %}
- name: elasticsearch-{{ salt['pillar.get']('logstash:es_ver') }}
include:
- redis
- base.example-ca
logstash-reqs:
pkg.installed:
- pkgs:
- {{ salt['pillar.get']('packages:jre7') }}
user.present:
- name: logstash
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define :i386 do |i386|
RELEASE="current"
i386.vm.box = "obsd-current-i386"
i386.vm.network :private_network, ip: "192.168.50.4", type: "static"
i386.vm.synced_folder "~/Work/OpenBSD/packages/#{RELEASE}", "/usr/ports/packages", :nfs => true
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define :i386 do |i386|
i386.vm.box = "obsd-current-i386"
i386.vm.network :private_network, ip: "192.168.50.4", type: "static"
end