Skip to content

Instantly share code, notes, and snippets.

View valentinbud's full-sized avatar

Valentin Bud valentinbud

View GitHub Profile
### VERBOSE BUILD
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install fcgiwrap
==> Downloading https://github.com/downloads/gnosek/fcgiwrap/fcgiwrap-1.0.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/fcgiwrap-1.0.3.tar.gz
tar xf /Library/Caches/Homebrew/fcgiwrap-1.0.3.tar.gz
==> autoreconf -i
autoreconf -i
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
@valentinbud
valentinbud / error
Last active December 20, 2015 12:39
----------
State: - service
Name: nginx
Function: running
Result: False
Comment: The following requisites were not found:
watch: {'file': '/etc/nginx/sites-enabled/*'}
watch: {'file': '/etc/nginx/nginx.conf'}
watch: {'file': '/etc/nginx/conf.d/*.conf'}
openldap-server:
{% if grains['os'] == 'Debian' %}
package:
name: slapd
version: 2.4.23-7.3
service: slapd
{% endif %}
cn:
config:
#!/bin/bash
#
# This hook updates the local pillar data.
# It basically runs `git pull` in salt master's
# pillar_roots directory.
#
# Only suports one environment - base. The branch is master
# and the environment production.
#
remote: UPDATING LOCAL PILLAR
remote: /srv/salt/salt-pillar
remote: fatal: Not a git repository: '.'
import os
def get_ssh_public_key():
pub_key = ''
with open("/var/lib/one/.ssh/id_rsa.pub", 'rb') as infile:
for line in infile:
pub_key += line
return {'oneadmin_public_key' : pub_key}
# salt-call -l debug lxc.create lxc02 template=debian-wheezy backing=lvm vgname=vg0 size=2G
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: list indices must be integers, not str
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 77, in salt_call
client.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 303, in run
# cat /srv/salt/pillar/lxc/init.sls
lxc:
profile:
debian:
template: debian-wheezy
backing: lvm
vgname: vg0
size: 1G
# cat /srv/salt/pillar/lxc/init.sls
lxc.profile:
profile:
debian:
template: debian-wheezy
backing: lvm
vgname: vg0
size: 1G
diff --git a/salt/modules/lxc.py b/salt/modules/lxc.py
index 26dd259..a6757c3 100644
--- a/salt/modules/lxc.py
+++ b/salt/modules/lxc.py
@@ -68,7 +68,8 @@ def _nic_profile(nic):
def _gen_config(nicp,
cpuset=None,
cpushare=None,
- memory=None):
+ memory=None,