Fix bug related to #188

This commit is contained in:
N 2019-01-25 19:20:58 +00:00
parent 86f0ae93eb
commit 2356b4a989
No known key found for this signature in database
GPG Key ID: 93AFB6C0144D1A90
2 changed files with 15 additions and 13 deletions

View File

@ -33,7 +33,7 @@
# Gets the current canonical name of a server # Gets the current canonical name of a server
{% macro server_curpath(server) -%} {% macro server_curpath(server) -%}
{{ server_path(server, nginx.servers.managed.get(server).get('available')) }} {{ server_path(server, nginx.servers.managed.get(server).get('available_dir')) }}
{%- endmacro %} {%- endmacro %}
# Creates the sls block that manages symlinking / renaming servers # Creates the sls block that manages symlinking / renaming servers

View File

@ -109,23 +109,25 @@ nginx:
managed_opts: {} # partially exposes file.managed params for managed server files managed_opts: {} # partially exposes file.managed params for managed server files
dir_opts: {} # partially exposes file.directory params for site available/enabled and snippets dirs dir_opts: {} # partially exposes file.directory params for site available/enabled and snippets dirs
# server declarations
# servers will default to being placed in server_available #####################
# server declarations; placed by default in server "available" directory
#####################
managed: managed:
mysite: # relative pathname of the server file
mysite: # relative filename of server file (defaults to '/etc/nginx/sites-available/mysite')
# 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
enabled: True enabled: True
# Remove the site config file. Nice to clean up the conf.d (or sites-available).
# Remove the site config file shipped by nginx (i.e. '/etc/nginx/sites-available/default' by default)
# It also remove the symlink (if it is exists). # It also remove the symlink (if it is exists).
# The site MUST be disabled before delete it (if not the nginx is not reloaded). # The site MUST be disabled before delete it (if not the nginx is not reloaded).
deleted: True #deleted: True
###########
## Modify 'available_dir' AND 'enabled_dir' '/etc/nginx' location to alternative value. #available_dir: /etc/nginx/sites-available-custom # custom directory (not sites-available) for server filename
########### #enabled_dir: /etc/nginx/sites-enabled-custom # custom directory (not sites-enabled) for server filename
available_dir: /etc/nginx/sites-available # an alternate directory (not sites-available) where this server may be found disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
enabled_dir: /etc/nginx/sites-enabled # an alternate directory (not sites-enabled) where this server may be found overwrite: True # overwrite an existing server file or not
disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
overwrite: True # overwrite an existing server file or not
# May be a list of config options or None, if None, no server file will be managed/templated # May be a list of config options or None, if None, no server file will be managed/templated
# Take server directives as lists of dictionaries. If the dictionary value is another list of # Take server directives as lists of dictionaries. If the dictionary value is another list of