소스 검색

Separate 'dir' into 'available_dir' and 'enabled_dir'

susefix
Imran Haider 9 년 전
부모
커밋
481c3d6aa4
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +3
    -3
      nginx/ng/vhosts_config.sls
  2. +1
    -1
      pillar.example

+ 3
- 3
nginx/ng/vhosts_config.sls 파일 보기

@@ -23,11 +23,11 @@
# Gets the path of a particular vhost
{% macro vhost_path(vhost, state) -%}
{%- if state == True -%}
{{ path_join(vhost, nginx.vhosts.managed.get(vhost).get('dir', nginx.lookup.vhost_enabled)) }}
{{ path_join(vhost, nginx.vhosts.managed.get(vhost).get('enabled_dir', nginx.lookup.vhost_enabled)) }}
{%- elif state == False -%}
{{ path_join(disabled_name(vhost), nginx.vhosts.managed.get(vhost).get('dir', nginx.lookup.vhost_available)) }}
{{ path_join(disabled_name(vhost), nginx.vhosts.managed.get(vhost).get('available_dir', nginx.lookup.vhost_available)) }}
{%- else -%}
{{ path_join(vhost, nginx.vhosts.managed.get(vhost).get('dir', nginx.lookup.vhost_available)) }}
{{ path_join(vhost, nginx.vhosts.managed.get(vhost).get('available_dir', nginx.lookup.vhost_available)) }}
{%- endif -%}
{%- endmacro %}


+ 1
- 1
pillar.example 파일 보기

@@ -74,7 +74,7 @@ nginx:
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
available_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

Loading…
취소
저장