Created
May 15, 2015 17:08
-
-
Save anonymous/1bb2f4a7be3175853172 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) | |
return config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment