Skip to content

Instantly share code, notes, and snippets.

View ssplatt's full-sized avatar

Brett Taylor ssplatt

  • Picwell
  • Philadelphia, PA
View GitHub Profile
@ssplatt
ssplatt / provision.sh
Created September 8, 2016 20:38
ceph deploy provisioning for debian
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo systemctl stop ntp
sudo ntpd -gq
sudo systemctl start ntp
sudo apt-get install xfsprogs python-pip
@ssplatt
ssplatt / grub_example.sls
Last active August 15, 2016 15:04
update-grub example
{%- from "grub/map.jinja" import grub with context %}
grub_default_config:
file.managed:
- name: '/etc/default/grub'
- source: salt://grub/files/default_grub.j2
- user: root
- group : root
- mode: 0644
- template: jinja
@ssplatt
ssplatt / salt-bootstrap-with-sudo.sh
Created July 19, 2016 19:04
dirty hack for running kitchen tests on hosts without sudo pre-installed
#!/bin/sh -
#======================================================================================================================
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=120
#======================================================================================================================
#
# FILE: bootstrap-salt.sh
#
# DESCRIPTION: Bootstrap Salt installation for various systems/distributions
#
# BUGS: https://github.com/saltstack/salt-bootstrap/issues
@ssplatt
ssplatt / salt-no-chef.sh
Last active June 2, 2017 20:02
kitchen-salt bootstrap without chef omnibus script
#!/bin/sh
##
## modified chef install script
## for kitchen-salt, the entirety of chef is not required
## but ruby and gem are required in a specific directory
## for kitchen tests to run
##
packages="ruby ruby-dev"
check_for_minion_to_autoaccept:
local.file.line:
- name: /etc/salt/autoaccept.conf
- content: {{ data.id }}
- mode: delete
- require_in:
- wheel: minion_auto_add
minion_auto_add:
wheel.key.accept:
----------
ID: networking_system_config
Function: network.system
Result: True
Comment: Global network settings are up to date.
Started: 21:06:15.944862
Duration: 28.254 ms
Changes:
----------
network_settings:
@ssplatt
ssplatt / install.sh
Last active November 20, 2017 00:13
kitchen salt bootstrap chef omnibus modification
#!/bin/sh
packages="ruby ruby-dev"
# install_file TYPE FILENAME
# TYPE is "rpm", "deb", "solaris", "sh", etc.
install_file() {
echo "Installing the ruby things"
case "$1" in
"redhat")
@ssplatt
ssplatt / bootstrap-salt-deb6.sh
Last active March 4, 2016 01:52
modified salt bootstrap script to work with EOL debian 6
#!/bin/sh -
#======================================================================================================================
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=120
#======================================================================================================================
#
# FILE: bootstrap-salt.sh
#
# DESCRIPTION: Bootstrap Salt installation for various systems/distributions
#
# BUGS: https://github.com/saltstack/salt-bootstrap/issues
@ssplatt
ssplatt / gist:fbf2899d00d4f881239a
Created January 14, 2016 19:05
textmate grok bundle
{ patterns = (
{ name = 'comment.line.number-sign.grok';
match = '^#[^\n]+\n';
},
{ name = 'variable.parameter.grok';
begin = '^[A-Z0-9_\-]+';
end = '\s';
},
{ name = 'variable.other.grok';
begin = '%{';
@ssplatt
ssplatt / zulip_push_email.py
Last active December 7, 2015 15:10
push local mailbox mail to zulip
#!/usr/bin/env python
import zulip
import mailbox
client = zulip.Client(email="[email protected]",
api_key="111222aaabbb",
site="https://zulip.server.tld/api/")
mailbox_loc = '/var/mail/user'