Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jasonrm's full-sized avatar

Jason R. McNeil jasonrm

  • Arizona
  • 22:30 (UTC -07:00)
View GitHub Profile
@jasonrm
jasonrm / salt-minion.service
Last active August 29, 2015 13:57
Wait for systemd-networkd before starting salt-minion
# /etc/systemd/system/salt-minion.service
[Unit]
Description=Salt Minion Daemon
Requires=network.target
After=network.target
[Service]
Type=forking
PIDFile=/run/salt/salt-minion.pid
ExecStart=/usr/bin/salt-minion -d
[Unit]
Description=Zettabyte File System (ZFS)
Documentation=man:zfs(8) man:zpool(8)
DefaultDependencies=no
After=cryptsetup.target
Before=local-fs.target
Conflicts=shutdown.target umount.target
[Service]
Type=oneshot
@jasonrm
jasonrm / salt.markdown
Last active August 29, 2015 14:00
Manageable salt state independence

I'm trying to determine how I might be able to keep a group of states (modules) from having direct knowledge about each other, while still allowing them to put and get configuration information on a local-to-the-minion level.

For example, my nginx related states and config should have no knowledge about logstash and where it might put a config file. Instead I want the logstash to make it known (how is the question) that it has a log file available for consumption.

Say I have a logstash process running on a machine and it's configuration looks something like the below. Right now it's going to read in just one log file, but in just a bit I want it to read in any log file that another service, managed via a role/state, might add.

/etc/logstash/agent.conf
input {
 file {
@jasonrm
jasonrm / iam.json
Last active August 29, 2015 14:01
Arq Backup Amazon S3/Glacier IAM
{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": ["s3:*"],

Keybase proof

I hereby claim:

  • I am jasonrm on github.
  • I am jasonrm (https://keybase.io/jasonrm) on keybase.
  • I have a public key whose fingerprint is 8D30 5849 4DE7 8944 4BC1 ED15 05A6 98DE D86D 1E57

To claim this, I am signing this object:

require "formula"
class Globalplatform < Formula
homepage "http://sourceforge.net/p/globalplatform/wiki/Home/"
url "https://downloads.sourceforge.net/project/globalplatform/GlobalPlatform%20Library/GlobalPlatform%20Library%206.0.0/globalplatform-6.0.0.tar.gz"
sha1 "5a08bec4cbcc8caffa7c646a35600712f468553c"
resource "gppcscconnectionplugin" do
url "https://downloads.sourceforge.net/project/globalplatform/GlobalPlatform%20Library/GlobalPlatform%20Library%206.0.0/gppcscconnectionplugin-1.1.0.tar.gz"
sha1 "38eb3d739f1b75ba954f09a928a6e9db0178ea53"
@jasonrm
jasonrm / gist:a4a18f93e437642114c9
Last active August 29, 2015 14:07
deis BUILDPACK_URL issue
$ deis config:list
=== web01 Config
BUILDPACK_URL https://github.com/heroku/heroku-buildpack-php
$ deis config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
Creating config... done, v14
=== web01
DEIS_APP: web01
DEIS_RELEASE: v14
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFRDUxgBEADG1DU072hJPgNMzMwbwXJqMD2E9+jgCRWoWeAF7kvHDuKXovaW
KO1y3mtGpZxpZxTRVpAcbyDdVrm19HYNqDJRlo0s1317Zb2WDFpUg/JsnWLI6015
1C7/IdO5w8TMHJCBPYGR/6Zv7oY3weAIyoHeN3puR7UMcg02Ktpd0mvUsiAtW7CZ
vgTEt1NT//Wk5a2wd7Fp4r6vfkO+pImxRMgrQYFSpGhvjl56rpN+bX6JzTrNDl5V
nhnbzKXiPHDEkpW6n1izqetqPudCOtsnRi4m91loSRbuxm3tRjASqynf3Gd5frOw
uSzgMbdZDlR1B0T9d7i+OxjJtA8AkBtG+BfZmbSguM53cJI6eDsY8cwfi6noVR09
RGFPygOcuNfTIUa3mWO3MqS29mS7VQfV54pcA2Oi1cCWoeCz9OXopiIzFoeITHFu

Keybase proof

I hereby claim:

  • I am jasonrm on github.
  • I am jasonrm (https://keybase.io/jasonrm) on keybase.
  • I have a public key whose fingerprint is 6200 AF41 CB1B F0D7 EFE7 F090 D8D7 1948 390B 904F

To claim this, I am signing this object:

@jasonrm
jasonrm / rundeck.py
Created December 10, 2014 04:54
Quick testing with Salt as the resource source for Rundeck
# Import salt modules
import salt.client
# Import third party libs
import yaml
def resources():
'''
Print a list of all of the minions as YAML formatted resource for rundeck
'''