Created
March 7, 2015 01:19
-
-
Save iggy/0441dec0a77bbc549eb7 to your computer and use it in GitHub Desktop.
multiple states/pillar/etc example
This file contains hidden or 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
mysql: | |
# Manage databases | |
database: | |
- foo | |
- bar | |
schema: | |
foo: | |
load: True | |
source: salt://mysql/files/foo.schema | |
bar: | |
load: False | |
# Manage users | |
# you can get pillar for existent server using scripts/import_users.py script | |
user: | |
frank: | |
password: 'somepass' | |
host: localhost | |
databases: | |
- database: foo | |
grants: ['select', 'insert', 'update'] | |
- database: bar | |
grants: ['all privileges'] | |
nginx: | |
ng: | |
vhosts: | |
disabled_postfix: .disabled # a postfix appended to files when doing non-symlink disabling | |
symlink_opts: {} # partially exposes file.symlink params when symlinking enabled sites | |
rename_opts: {} # partially exposes file.rename params when not symlinking disabled/enabled sites | |
managed_opts: {} # partially exposes file.managed params for managed vhost files | |
dir_opts: {} # partially exposes file.directory params for site available/enabled dirs | |
# vhost declarations | |
# vhosts will default to being placed in vhost_available | |
managed: | |
mysite: # relative pathname of the vhost file | |
# may be True, False, or None where True is enabled, False, disabled, and None indicates no action | |
dir: /tmp # an alternate directory (not sites-available) where this vhost may be found | |
disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking | |
enabled: True | |
# May be a list of config options or None, if None, no vhost file will be managed/templated | |
# Take server directives as lists of dictionaries. If the dictionary value is another list of | |
# dictionaries a block {} will be started with the dictionary key name | |
config: | |
- server: | |
- server_name: localhost | |
- listen: | |
- 80 | |
- default_server | |
- index: | |
- index.html | |
- index.htm | |
- location ~ .htm: | |
- try_files: | |
- $uri | |
- $uri/ =404 | |
- test: something else | |
app: | |
install_path: /srv/app1 | |
whatever: True |
This file contains hidden or 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
'base': | |
'roles:mysql': | |
- match: grain | |
- apps.app1 | |
'roles:web': | |
- match: grain | |
- apps.app1 |
This file contains hidden or 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
'base': | |
'roles:mysql': | |
- match: grain | |
- mysql | |
'roles:web': | |
- match: grain | |
- app1 | |
- nginx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment