Browse Source

vhost_overwrite option for nginx.ng state

susefix
George Robinson 8 years ago
parent
commit
9ff1a8f22d
2 changed files with 10 additions and 0 deletions
  1. +6
    -0
      nginx/ng/map.jinja
  2. +4
    -0
      nginx/ng/vhosts_config.sls

+ 6
- 0
nginx/ng/map.jinja View File

'vhost_available': '/etc/nginx/sites-available', 'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled', 'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True, 'vhost_use_symlink': True,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid', 'pid_file': '/run/nginx.pid',
}, },
'CentOS': { 'CentOS': {
'vhost_available': '/etc/nginx/conf.d', 'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d', 'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False, 'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid', 'pid_file': '/run/nginx.pid',
'rh_os_releasever': '$releasever', 'rh_os_releasever': '$releasever',
'gpg_check': False, 'gpg_check': False,
'vhost_available': '/etc/nginx/conf.d', 'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d', 'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False, 'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid', 'pid_file': '/run/nginx.pid',
'rh_os_releasever': '$releasever', 'rh_os_releasever': '$releasever',
'gpg_check': False, 'gpg_check': False,
'vhost_available': '/etc/nginx/conf.d', 'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d', 'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False, 'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid', 'pid_file': '/run/nginx.pid',
'gpg_check': True, 'gpg_check': True,
'gpg_key': 'http://download.opensuse.org/repositories/server:/http/openSUSE_13.2/repodata/repomd.xml.key' 'gpg_key': 'http://download.opensuse.org/repositories/server:/http/openSUSE_13.2/repodata/repomd.xml.key'
'vhost_available': '/etc/nginx/sites-available', 'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled', 'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True, 'vhost_use_symlink': True,
'vhost_overwrite': True,
}, },
'Gentoo': { 'Gentoo': {
'package': 'www-servers/nginx', 'package': 'www-servers/nginx',
'vhost_available': '/etc/nginx/sites-available', 'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled', 'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True, 'vhost_use_symlink': True,
'vhost_overwrite': True,
}, },
}, default='Debian' ), }, default='Debian' ),
'install_from_source': False, 'install_from_source': False,

+ 4
- 0
nginx/ng/vhosts_config.sls View File

- template: jinja - template: jinja
- context: - context:
config: {{ settings.config|json() }} config: {{ settings.config|json() }}
{% if nginx.lookup.vhost_overwrite == False %}
- unless:
- test -e {{ vhost_curpath(vhost) }}
{% endif %}
{% do vhost_states.append(conf_state_id) %} {% do vhost_states.append(conf_state_id) %}
{% endif %} {% endif %}



Loading…
Cancel
Save