modules/modules/testme.py:
from salt.exceptions import CommandExecutionError
def testme(name):
if name == 'fail':
raise CommandExecutionError('test error message')
else:
return True
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
# NOTE: This example is probably not using the rvm state correctly | |
# This is just to show how to use jinja to only run a state if | |
# a path exists | |
{% set mypath = '/var/my/path' %} | |
{% if salt['file.exists'](mypath) %} | |
remove_ruby: | |
rvm.remove | |
{% endif %} |
Verifying that +utahdave is my openname (Bitcoin username). https://onename.io/utahdave |
''' | |
Manages Icinga Passive Check delivery | |
''' | |
import logging | |
import logging.handlers | |
import os | |
import signal | |
LOG_LEVELS = (logging.WARNING, logging.INFO, logging.DEBUG) |
base: | |
'*': | |
- base | |
- service-common | |
- order: 1 | |
{% for root in opts['pillar_roots']['base'] -%} | |
{% set service_group_sls = '{0}/{1}.sls'.format(root, grains['service_group']) -%} | |
{% if salt['file.file_exists'](service_group_sls) %} | |
'service_group:{{ grains["service_group"] }}': | |
- match: grain |
<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: |
. | |
├── bacula | |
│ ├── client.sls | |
│ └── server.sls | |
├── bprobe | |
│ └── init.sls | |
├── cpall.sls | |
├── dirty-users | |
│ ├── exports | |
│ ├── group -> /etc/group |
from subprocess import Popen | |
def start_server(): | |
cmd_str = 'coffee /tmp/app/app.coffee' | |
proc = Popen([cmd_str], shell=True, | |
stdin=None, stdout=None, stderr=None, close_fds=True) | |
return cmd_str |
modules/modules/testme.py:
from salt.exceptions import CommandExecutionError
def testme(name):
if name == 'fail':
raise CommandExecutionError('test error message')
else:
return True
# TEMP: Disable warnings after installing apache-libcloud | |
# Try disabling this after future versions of apache-libcloud are released | |
disable_libgmp_warning: | |
file.replace: | |
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/number.py | |
- pattern: 'if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:' | |
- repl: '#if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:' | |
disable_RandomPool_warning_line1: | |
file.replace: | |
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/randpool.py |