Created
May 18, 2015 11:09
-
-
Save jvblasco/d517eef3160a81107893 to your computer and use it in GitHub Desktop.
This file contains 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
#!py | |
import yaml | |
def run(): | |
config = yaml.load(file('/srv/pillar/common/nginx.sls', 'r')) | |
name = {'server_name': 'another-salt-test.com'} | |
root = {'root': '/var/www/another-salt-test.com/current/web'} | |
config['nginx']['ng']['server']['config']['worker_processes'] = __grains__['num_cpus'] | |
config['nginx']['ng']['vhosts']['managed']['production']['config'][0]['server'].insert(1, name) | |
config['nginx']['ng']['vhosts']['managed']['production']['config'][0]['server'].insert(2, root) | |
mysql = {'lookup': {'server': 'Percona-Server-server-56', | |
'client': 'Percona-Server-client-56', | |
'service': 'mysql', | |
'python': 'MySQL-python', | |
} | |
} | |
config['mysql'] = mysql | |
return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment