Skip to content

Instantly share code, notes, and snippets.

View thatch45's full-sized avatar

Thomas S Hatch thatch45

View GitHub Profile
@thatch45
thatch45 / states.state.py
Created March 1, 2012 16:19 — forked from sirkonst/states.state.py
State of states module for salt (saltstack)
"""
State module
============
The state module for logical union of several states.
Available Functions
-------------------
emacs:
pkg:
- installed
{% if grains['osrelease'].startswith('5') %}
- name: emacsBROKEN
{% endif %}
@thatch45
thatch45 / req.sls
Created February 21, 2012 22:40
require id and name
git:
pkg:
- installed
- name: git core
/etc/git/gitconfig:
file:
- managed
- source: salt://git/gitconfig
- require:
@thatch45
thatch45 / gist:1848800
Created February 16, 2012 23:38
many states, one id
httpd:
pkg:
- installed
service:
- running
- require:
- pkg: httpd
file:
- managed
- name: /etc/httpd/conf/httpd.conf
@thatch45
thatch45 / cmd-watch.sls
Created February 16, 2012 19:58
watch a command
tincd --net=MPXVPN --generate-keys=4096:
cmd:
- run
- unless: test -f /etc/tinc/MPXVPN/rsa_key.priv
tinc:
service:
- running
- watch:
- cmd: tincd --net=MPXVPN --generate-keys=4096
@thatch45
thatch45 / http-dead.sls
Created February 16, 2012 05:24
States, dead + disabled
httpd:
service:
- dead
- enable: False
# The dead/running functions handles both the running process and boot time enable/disable via the enable option, if you
# don't want to manage the running process then just use the disable function.
struct to compound:
nodegroups:
group1:
list:
- foo
- bar
- baz
glob:
- 'foo*'
def _return_pub(self, ret):
'''
Return the data from the executed command to the master server
'''
log.info('Returning information for job: %(jid)s', ret)
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect(self.opts['master_uri'])
payload = {'enc': 'aes'}
load = {'return': ret['return'],
/init: line 84: lvm: command not found
/init: line 85: lvm: command not found
/init: line 86: lvm: command not found
/init: line 87: ifconfig: command not found
/init: line 88: netstat: command not found
Module Size Used by
dm_mod 65167 0
virtio_balloon 4081 0
virtio_blk 4959 1
[root@ragnarok ~]# LIBGUESTFS_DEBUG=1 guestmount -i --ro -a arch /mnt/guest/
new guestfs handle 0x24591a0
[00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/lib/guestfs/supermin.d' x86_64
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
supermin helper [00002ms] finished creating kernel
supermin helper [00002ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00002ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [00002ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00003ms] visiting /usr/lib/guestfs/supermin.d/hostfiles