Merge pull request #209 from noelmcloughlin/fixes6

Fix sites-available bug in formula logic
This commit is contained in:
Niels Abspoel 2019-01-25 21:50:40 +01:00 committed by GitHub
commit a1220edb36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -127,21 +127,23 @@ 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
enabled_dir: /etc/nginx/sites-enabled # an alternate directory (not sites-enabled) where this server 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
overwrite: True # overwrite an existing server file or not overwrite: True # overwrite an existing server file or not