-
Notifications
You must be signed in to change notification settings - Fork 37
"yamlfile" module file spec
erikwb edited this page Dec 2, 2011
·
5 revisions
The "yamlfile" module included with libcrange allows you to specify clusters using a directory full of yaml files. To use this module, put "loadmodule yamlfile" in /etc/range.conf.
By default, it looks in /etc/range/*.yaml for these files. Each cluster is represented by one file named CLUSTER.yaml, where CLUSTER is the name of the cluster you want. Example:
$ cat /etc/range/test.yaml CLUSTER: host1..100.test.com APPS: - frontend - backend - mysql
This will give you a cluster called "test" with two keys, CLUSTER and APPS. To access these keys:
$ eh %test:CLUSTER host1..100.test.com $ eh %test:APPS frontend,backend,mysql
CLUSTER is a default key - if you don't ask for any :KEY at all, you'll get it.
$ eh %test host1..100.test.com
You can additionally list the keys that are defined with :KEYS. This is the only magically defined key.
$ eh %test:KEYS CLUSTER APPS
You can additionally do reverse-lookups on these keys.
$ eh 'has(APPS;mysql)' test