Skip to content

Instantly share code, notes, and snippets.

import platform
def custom_os_data():
grains = {}
if platform.uname()[0] == "Linux":
osrelease = platform.linux_distribution()[1]
try:
major, minor = osrelease.split(".",1)
grains['osmajorrelease'] = major
root@ksalman-solaris-salt:~# wget -O - https://bootstrap.saltstack.com | sh -s -- -D -P git v2014.7
--2015-01-14 12:49:35-- https://bootstrap.saltstack.com/
Resolving bootstrap.saltstack.com (bootstrap.saltstack.com)... 162.242.141.13
Connecting to bootstrap.saltstack.com (bootstrap.saltstack.com)|162.242.141.13|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh [following]
--2015-01-14 12:49:35-- https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.79.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.79.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
kernel-devel:
pkg.installed:
- version: 2.6.32-279.11.1.el6
foo:
- bar
- baz
@ksalman
ksalman / 1_pillar
Last active August 29, 2015 14:16
Using pillar data in python state renderer
vlabdb:
foo64: myvlabdb
{
"A": "test",
"B": "another test",
"C": [
"foo"
]
}
@ksalman
ksalman / CapsLockCtrlEscape.ahk
Created July 27, 2016 21:36 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own, and Ctrl when used in combination with another key, à la Steve Losh. Adapted from the one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (With some extra key combos added by @r…
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
2017-03-27 14:32:05,234 [salt.utils.parsers ][WARNING ][21351] Master received a SIGTERM. Exiting.$
2017-03-27 14:32:05,934 [salt.cli.daemons ][INFO ][25113] Setting up the Salt Master$
2017-03-27 14:32:06,000 [salt.crypt ][DEBUG ][25113] Loaded master key: /etc/salt/pki/master/master.pem$
2017-03-27 14:32:06,000 [salt.daemons.masterapi ][PROFILE ][25113] Beginning pwd.getpwall() call in masterarpi acess_keys function$
2017-03-27 14:32:06,005 [salt.daemons.masterapi ][PROFILE ][25113] End pwd.getpwall() call in masterarpi acess_keys function$
2017-03-27 14:32:06,005 [salt.daemons.masterapi ][INFO ][25113] Preparing the root key for local communication$
2017-03-27 14:32:06,006 [salt.daemons.masterapi ][DEBUG ][25113] Removing stale keyfile: /var/cache/salt/master/.root_key$
2017-03-27 14:32:06,034 [salt.log.setup ][DEBUG ][25113] Stopping the multipro
test
2017-03-27 14:32:05,234 [salt.utils.parsers ][WARNING ][21351] Master received a SIGTERM. Exiting.$
2017-03-27 14:32:05,934 [salt.cli.daemons ][INFO ][25113] Setting up the Salt Master$
2017-03-27 14:32:06,000 [salt.crypt ][DEBUG ][25113] Loaded master key: /etc/salt/pki/master/master.pem$
2017-03-27 14:32:06,000 [salt.daemons.masterapi ][PROFILE ][25113] Beginning pwd.getpwall() call in masterarpi acess_keys function$
2017-03-27 14:32:06,005 [salt.daemons.masterapi ][PROFILE ][25113] End pwd.getpwall() call in masterarpi acess_keys function$
2017-03-27 14:32:06,005 [salt.daemons.masterapi ][INFO ][25113] Preparing the root key for local communication$
2017-03-27 14:32:06,006 [salt.daemons.masterapi ][DEBUG ][25113] Removing stale keyfile: /var/cache/salt/master/.root_key$
2017-03-27 14:32:06,034 [salt.log.setup ][DEBUG ][25113] Stopping the multipro