This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ pillar['warnings']['master'] }} | |
# | |
# Sample configuration file for ISC dhcpd for Debian | |
# | |
# | |
# The ddns-updates-style parameter controls whether or not the server will | |
# attempt to do a DNS update when a lease is confirmed. We default to the | |
# behavior of the version 2 packages ('none', since DHCP v2 didn't | |
# have support for DDNS.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/salt/modules/lxc.py b/salt/modules/lxc.py | |
index 26dd259..9e36ae0 100644 | |
--- a/salt/modules/lxc.py | |
+++ b/salt/modules/lxc.py | |
@@ -9,6 +9,7 @@ Work with linux containers | |
import logging | |
import tempfile | |
import os | |
+import ast | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /srv/salt/pillar/lxc/init.sls | |
lxc.profile: | |
profile: | |
debian: | |
template: debian-wheezy | |
backing: lvm | |
vgname: vg0 | |
size: 1G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /srv/salt/pillar/lxc/init.sls | |
lxc: | |
profile: | |
debian: | |
template: debian-wheezy | |
backing: lvm | |
vgname: vg0 | |
size: 1G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote: UPDATING LOCAL PILLAR | |
remote: /srv/salt/salt-pillar | |
remote: fatal: Not a git repository: '.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openldap-server: | |
{% if grains['os'] == 'Debian' %} | |
package: | |
name: slapd | |
version: 2.4.23-7.3 | |
service: slapd | |
{% endif %} | |
cn: | |
config: |