Skip to content

Instantly share code, notes, and snippets.

@iggy
iggy / all-foo.sls
Created October 27, 2014 22:47
pillar question
rsyslog:
key1: True
@iggy
iggy / all.sls
Created October 28, 2014 13:57
mine functions pillar
mine_functions:
#test.ping: []
network.interfaces: []
network.get_hostname: []
disk.usage: []
grains.item:
- tags
- roles
diff --git a/aptly/aptly_config.sls b/aptly/aptly_config.sls
index 28b053c..b8bc69c 100644
--- a/aptly/aptly_config.sls
+++ b/aptly/aptly_config.sls
@@ -33,7 +33,7 @@ aptly_conf:
- require:
- file: aptly_homedir
-{% if {{ salt['pillar.get']('aptly:secure') %}
+{% if salt['pillar.get']('aptly:secure') %}
@iggy
iggy / -etc-salt-master.d-63reactor.conf
Created December 31, 2014 19:50
salt send events to graphite
reactor:
- 'salt/minion/*/start':
- /srv/reactor/sync_all.sls
- /srv/reactor/graphite_event.sls
reactor:
- 'salt/minion/*/start':
- /srv/reactor/sync_all.sls
- /srv/reactor/graphite_event.sls
sudo salt '*repo*' state.sls aptly.publish_repos
dev-repo01.c.oncenter-oasis-dns-project.oncenter.com.internal:
----------
ID: import_gpg_pub_key
Function: cmd.run
Name: gpg --no-tty --import /var/lib/aptly/repo/public/public.gpg
Result: False
Comment: Command "gpg --no-tty --import /var/lib/aptly/repo/public/public.gpg" run
Started: 23:46:37.022431
Duration: 102.384 ms
@iggy
iggy / pillar-nginx-dev.sls
Created March 7, 2015 00:43
2 pillars 1 state
nginx:
rootdir: /data/installer
server-name: dev.domain.com
@iggy
iggy / pillar-apps-app1.sls
Created March 7, 2015 01:19
multiple states/pillar/etc example
mysql:
# Manage databases
database:
- foo
- bar
schema:
foo:
load: True
source: salt://mysql/files/foo.schema
bar:
mine_functions:
#test.ping: []
network.interfaces: []
network.get_hostname: []
disk.usage: []
grains.item:
- tags
- roles
salt:
minion:
grains:
roles:
- salt_master