mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #1929 from github/1304-local
Take 2: Add support for .sls YAML files (SaltStack states)
This commit is contained in:
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
48
samples/SaltStack/eval.sls
Normal file
48
samples/SaltStack/eval.sls
Normal 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
|
||||
4
samples/SaltStack/top.sls
Normal file
4
samples/SaltStack/top.sls
Normal file
@@ -0,0 +1,4 @@
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
- coffeestats
|
||||
46
samples/Scheme/lambdastar.sls
Normal file
46
samples/Scheme/lambdastar.sls
Normal 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
1
vendor/grammars/atom-salt
vendored
Submodule
Submodule vendor/grammars/atom-salt added at 6d6bdc1be1
Reference in New Issue
Block a user