Merge pull request #88 from imran1008/separate-dir
Separate 'dir' into 'available_dir' and 'enabled_dir'
This commit is contained in:
commit
126169fea1
@ -23,11 +23,11 @@
|
|||||||
# Gets the path of a particular vhost
|
# Gets the path of a particular vhost
|
||||||
{% macro vhost_path(vhost, state) -%}
|
{% macro vhost_path(vhost, state) -%}
|
||||||
{%- if state == True -%}
|
{%- 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 -%}
|
{%- 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 -%}
|
{%- 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 -%}
|
{%- endif -%}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
@ -74,7 +74,8 @@ nginx:
|
|||||||
managed:
|
managed:
|
||||||
mysite: # relative pathname of the vhost file
|
mysite: # relative pathname of the vhost file
|
||||||
# may be True, False, or None where True is enabled, False, disabled, and None indicates no action
|
# 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/sites-available # an alternate directory (not sites-available) where this vhost may be found
|
||||||
|
enabled_dir: /tmp/sites-enabled # 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
|
disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
|
||||||
enabled: True
|
enabled: True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user