Skip to content

Instantly share code, notes, and snippets.

View thatch45's full-sized avatar

Thomas S Hatch thatch45

View GitHub Profile
Traceback (most recent call last):
File "setup.py", line 880, in <module>
setup(distclass=SaltDistribution)
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 475, in run
@thatch45
thatch45 / gist:2938937
Created June 15, 2012 22:07
just a file
/etc/conf.d/iptables.rules:
file.managed:
- source: salt://iptables/iptables.rules
- user: root
- group: root
- mode: 600
@thatch45
thatch45 / saltjobcache
Created June 6, 2012 16:38
Salt jobs dirs - 0.9.9
This shows how the job cache directories are laid out, the limit comes because each jid is hashed but each jid directory has subdirs for all minions. These minions are from a minionswarm
[root@ragnarok srv]# ls -l /var/cache/salt/
total 16
drwx------ 2 root root 4096 Apr 19 02:10 extmods
drwx------ 3 root root 4096 Jun 6 08:33 files
drwx------ 121 root root 4096 Jun 6 09:27 jobs
drwxr-xr-x 2 root root 4096 Jun 6 09:27 proc
@thatch45
thatch45 / gist:2563169
Created April 30, 2012 22:20
Install from source
'make && make install':
cmd.run:
- unless: 'cat /usr/bin/redis'
- require:
- cmd: 'git clone <redis source>'
'git clone <redis source>':
cmd.run:
- unless: 'test -e /usr/src/redis'
- cwd: /usr/src
@thatch45
thatch45 / gist:2484144
Created April 24, 2012 21:50
many state decs, one id dec
fred:
group:
- present
- gid: 2000
user:
- present
- uid: 2000
- gid: 2000
- require:
- group: fred
apt-update:
cmd:
- wait
- name: /usr/bin/apt-get update
@thatch45
thatch45 / gist:2141958
Created March 20, 2012 22:30
ssh error
Traceback (most recent call last):
File "/usr/bin/salt-call", line 21, in <module>
main()
File "/usr/bin/salt-call", line 17, in main
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/__init__.py", line 738, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 112, in run
ret = self.call()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 46, in call
# Some config stuff
module_dirs:
{% if grains['fqdn'] == 'foo'%}
- /path/to/dir
{% endif %}
@thatch45
thatch45 / file_roots master
Created March 2, 2012 18:46
Env priorities
file_roots:
base:
- /srv/salt/base
dev:
- /srv/salt/dev
- /srv/salt/base
some_config:
file:
- managed
- source: salt://some_service/vtag
- require: # or require declaration
- file: /etc/some_service/conf_1.conf
- file: /etc/some_service/conf_2.conf
- file: /etc/some_service/conf_3.conf
some_service: