Skip to content

Instantly share code, notes, and snippets.

@kojiromike
Created March 29, 2018 18:11
Show Gist options
  • Select an option

  • Save kojiromike/baa0573c392fc5004cf89f44b3831dc0 to your computer and use it in GitHub Desktop.

Select an option

Save kojiromike/baa0573c392fc5004cf89f44b3831dc0 to your computer and use it in GitHub Desktop.

Revisions

  1. kojiromike created this gist Mar 29, 2018.
    28 changes: 28 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    --- 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?