Skip to content

Instantly share code, notes, and snippets.

@kojiromike
Created March 29, 2018 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kojiromike/baa0573c392fc5004cf89f44b3831dc0 to your computer and use it in GitHub Desktop.
Save kojiromike/baa0573c392fc5004cf89f44b3831dc0 to your computer and use it in GitHub Desktop.
--- nginx/configure.sls
/etc/nginx/conf.d/default.conf:
file.managed:
- source: salt://nginx/files/default.conf
- makedirs: True
- require_in:
- file: /etc/nginx/conf.d
--- blazegraph/configure.sls (what I currently have)
include:
- nginx.configure
extend:
/etc/nginx/conf.d/default.conf:
file:
- source: null
- contents:
- "# The default.conf we normally install with nginx"
- "# conflicts with what we want on blazegraph."
- "# It listens on ports and requires certificates"
- "# that cause conflicts, and that we don't use or need."
# What I'm curious about is if I can cause the /etc/nginx/conf.d/default.conf
# to go away entirely on minions using the blazegraph.configure state. This used
# to use file.absent, but salt would first create, then delete the file every time.
# I switched to removing all its contents, but is there any way to actually remove
# the file?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment