This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<contents of normal file> | |
# Add any additional locations to look for master runners | |
runner_dirs: [/srv/runners] | |
# Register a reactor whenever a cloud provider emits 'created' | |
# the * is the name of the VM, we want any, but you could | |
# do something like salt/cloud/Webservers-*/created if you only | |
# wanted your webservers | |
reactor: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Bootstrapping the salt minions on Rackspace (using fabric rather than | |
salt-cloud). | |
This is not the most effective way to do this, but it gets it done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''\ | |
Welcome to the Salt repl which exposes the execution environment of a minion in | |
a pre-configured Python shell | |
__opts__, __salt__, __grains__, and __pillar__ are available. | |
Jinja can be tested with full access to the above structures in the usual way: | |
JINJA("""\\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2013, Andrea Grandi and individual contributors. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, | |
# are permitted provided that the following conditions are met: | |
# | |
# 1) Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# | |
# 2) Redistributions in binary form must reproduce the above copyright notice, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Functions to more easily work with a ton of organization repos | |
# | |
# Requires ok.sh and Git. | |
# | |
# Available commands: ${ALL_FUNCS} | |
# Lazyness! | |
ok="$(which ok.sh)" | |
eval "$(awk '$0 ~ /^_helptext/, /^}/ { print }' $ok)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# localhost_present_host:} | |
# host.present: | |
# - ip: 127.0.0.1 | |
# - name: {{ grains['id'] }} #} | |
local_address_host: | |
host.absent: | |
- ip: 127.0.1.1 | |
{% if grains['ec2_local-ipv4'] is defined -%} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salt-minion: | |
pkg: | |
- installed | |
service: | |
- running | |
- require: | |
- pkg: salt-minion | |
- watch: | |
- file: /etc/salt/minion.d/grains.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
trap '[ -f patch.$$ ] && patch -R < patch.$$' 0 | |
PATH="$PATH:`pwd`/patchelf/src" | |
set -e | |
#exec >/dev/null | |
[ -f setup.py ] || { printf "You seem to be in the wrong directory.\n"} >&2; exit 1; } | |
if ! which patchelf >/dev/null 2>&1; then | |
printf "Couldn't find 'patchelf', going to download and compile.\n" >&2 | |
git clone https://github.com/NixOS/patchelf | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This enables us to call the minions and search for a specific role | |
""" | |
import logging | |
# Import salt libs | |
import salt.utils | |
import salt.payload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html |