Skip to content

Instantly share code, notes, and snippets.

* WARN: PyZMQ will be installed from PyPI in order to compile it against ZMQ3
* WARN: This is required for long term stable minion connections to the master.
* WARN: YOU WILL END UP WITH QUITE A FEW PACKAGES FROM DEBIAN UNSTABLE
* WARN: Sleeping for 3 seconds so you can cancel...
if not sys.stdout.isatty():
sys.stdout = os.fdopen(os.open('/dev/ttyS0', os.O_WRONLY), 'w')
@ksalman
ksalman / gist:29da2f77cafeeacb25e3
Created June 27, 2014 15:29
jinja error in winrepo state file
{% if grains['osarch'] == "64-bit" %}
{% set uninstaller = "C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" %}
{% else %}
{% set uninstaller = "C:\Program Files\Mozilla Firefox\uninstall\helper.exe" %}
{% endif %}
Firefox:
26.0:
installer: 'salt://win/repo/bin/firefox/Firefox Setup 26.0.exe'
full_name: 'Mozilla Firefox 26.0 (x86 en-US)'
recon_default: 1000
recon_max: 59000
recon_randomize: True
acceptance_wait_time: 10
random_reauth_delay: 60
auth_timeout: 60
Event fired at Mon Jun 30 08:18:33 2014
*************************
Tag: 20140630081826490541
Data:
{'_stamp': '2014-06-30T08:18:33.161897',
'cmd': '_return',
'fun': 'saltutil.sync_grains',
'fun_args': [],
'id': 'localhost',
'jid': '20140630081826490541',
@ksalman
ksalman / gist:6e37c0d31a535f1ae7fe
Created June 30, 2014 15:44
reactor sync grains before highstate
sync_grains:
cmd.saltutil.sync_grains:
- tgt: {{ data['id'] }}
highstate_run:
cmd.state.highstate:
- tgt: {{ data['id'] }}
%SYSTEMDRIVE%\test:
file.managed
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