Skip to content

Instantly share code, notes, and snippets.

@holms
Forked from iggy/pillar-apps-app1.sls
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holms/99b716cd8b44bcb7e567 to your computer and use it in GitHub Desktop.
Save holms/99b716cd8b44bcb7e567 to your computer and use it in GitHub Desktop.
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
'base':
'roles:mysql':
- match: grain
- apps.app1
'roles:web':
- match: grain
- apps.app1
'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