Ver código fonte

vhost_overwrite option for nginx.ng state

susefix
George Robinson 8 anos atrás
pai
commit
9ff1a8f22d
2 arquivos alterados com 10 adições e 0 exclusões
  1. +6
    -0
      nginx/ng/map.jinja
  2. +4
    -0
      nginx/ng/vhosts_config.sls

+ 6
- 0
nginx/ng/map.jinja Ver arquivo

@@ -14,6 +14,7 @@
'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid',
},
'CentOS': {
@@ -24,6 +25,7 @@
'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid',
'rh_os_releasever': '$releasever',
'gpg_check': False,
@@ -37,6 +39,7 @@
'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid',
'rh_os_releasever': '$releasever',
'gpg_check': False,
@@ -50,6 +53,7 @@
'vhost_available': '/etc/nginx/conf.d',
'vhost_enabled': '/etc/nginx/conf.d',
'vhost_use_symlink': False,
'vhost_overwrite': True,
'pid_file': '/run/nginx.pid',
'gpg_check': True,
'gpg_key': 'http://download.opensuse.org/repositories/server:/http/openSUSE_13.2/repodata/repomd.xml.key'
@@ -62,6 +66,7 @@
'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True,
'vhost_overwrite': True,
},
'Gentoo': {
'package': 'www-servers/nginx',
@@ -71,6 +76,7 @@
'vhost_available': '/etc/nginx/sites-available',
'vhost_enabled': '/etc/nginx/sites-enabled',
'vhost_use_symlink': True,
'vhost_overwrite': True,
},
}, default='Debian' ),
'install_from_source': False,

+ 4
- 0
nginx/ng/vhosts_config.sls Ver arquivo

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


Carregando…
Cancelar
Salvar