Merge pull request #1929 from github/1304-local

Take 2: Add support for .sls YAML files (SaltStack states)
This commit is contained in:
Arfon Smith
2014-12-31 09:45:14 -06:00
7 changed files with 119 additions and 3 deletions

9
.gitmodules vendored
View File

@@ -244,9 +244,6 @@
[submodule "vendor/grammars/abap.tmbundle"]
path = vendor/grammars/abap.tmbundle
url = https://github.com/pvl/abap.tmbundle
[submodule "vendor/grammars/Scalate.tmbundle"]
path = vendor/grammars/Scalate.tmbundle
url = https://github.com/scalate/Scalate.tmbundle
[submodule "vendor/grammars/mercury-tmlanguage"]
path = vendor/grammars/mercury-tmlanguage
url = https://github.com/sebgod/mercury-tmlanguage
@@ -523,3 +520,9 @@
[submodule "vendor/grammars/sas.tmbundle"]
path = vendor/grammars/sas.tmbundle
url = https://github.com/rpardee/sas.tmbundle
[submodule "vendor/grammars/atom-salt"]
path = vendor/grammars/atom-salt
url = https://github.com/saltstack/atom-salt
[submodule "vendor/grammars/Scalate.tmbundle"]
path = vendor/grammars/Scalate.tmbundle
url = https://github.com/scalate/Scalate.tmbundle

View File

@@ -115,6 +115,9 @@ vendor/grammars/asp.tmbundle:
vendor/grammars/assembly.tmbundle:
- objdump.x86asm
- source.x86asm
vendor/grammars/atom-salt:
- source.python.salt
- source.yaml.salt
vendor/grammars/autoitv3-tmbundle:
- source.autoit.3
vendor/grammars/awk-sublime:

View File

@@ -2632,6 +2632,17 @@ Sage:
tm_scope: source.python
ace_mode: python
SaltStack:
type: data
group: YAML
aliases:
- saltstate
- salt
extensions:
- .sls
tm_scope: source.yaml.salt
ace_mode: yaml
Sass:
type: markup
tm_scope: source.sass

View File

@@ -0,0 +1,48 @@
ceph:
pkg.installed:
- refresh: True
service:
- dead
- enable: False
- require:
- file: /etc/eval.conf
{% if grains['os'] == 'Ubuntu'%}
- file: /etc/apt/sources.list.d/ceph.list
{% endif %}
ceph-mds:
pkg.installed:
- require:
- pkg: ceph
include:
- ceph.extras
{% if grains['os'] == 'Ubuntu'%}
/etc/apt/sources.list.d/ceph.list:
file.managed:
- source: salt://ceph/apt.list
- template: jinja
- require:
- cmd: repo-key
repo-key:
cmd.run:
- name: 'wget -q -O - https://raw.github.com/release.asc | sudo apt-key add -'
- unless: 'apt-key list | grep -q -i ceph'
{% endif %}
/etc/ceph/ceph.conf:
file.managed:
- source: salt://ceph/eval.conf
- template: jinja
- makedirs: true
/var/lib/ceph:
file.directory:
- names:
{% for dir in 'mon.a','osd.0','osd.1','mds.a' %}
- /var/lib/ceph/{{ dir.split('.')[0] }}/ceph-{{ dir.split('.')[1] }}
{% endfor %}
- require:
- pkg: ceph

View File

@@ -0,0 +1,4 @@
base:
'*':
- packages
- coffeestats

View File

@@ -0,0 +1,46 @@
(library (lambdastar)
(export (rename (lambda* lambda)))
(import (rnrs))
(define-syntax lambda*
(syntax-rules ()
((_ a* e* ...)
( lambda*-h a* (let () e* ...)))))
(define-syntax lambda*-h
(syntax-rules ()
((_ () e)
(lambda a* (if (null? a*) e (apply (e) a*))))
((_ (a a* ...) e) (posary-h (a a* ...) e))
((_ (a a* ... . rest) e)
(polyvariadic-h (a a* ... . rest) e))
((_ a* e) (lambda a* e))))
(define-syntax posary-h
(syntax-rules ()
((_ (a a* ...) e)
(letrec
((rec
(case-lambda
(() rec)
((a a* ...) e)
((a a* ... . rest)
(apply (rec a a* ...) rest))
(some (get-more rec some)))))
rec))))
(define-syntax polyvariadic-h
(syntax-rules ()
((_ (a a* ... . rest) e)
(letrec
((rec
(case-lambda
(() rec)
((a a* ... . rest) e)
(some (get-more rec some)))))
rec))))
(define get-more
(lambda (rec some)
(lambda more
(apply rec (append some more))))))

1
vendor/grammars/atom-salt vendored Submodule