saltstack-formulas / nginx-formula

Nginx Salt Formula
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
163 stars 421 forks source link

[BUG] Service is not reloaded when snippets are added #291

Open sticky-note opened 2 years ago

sticky-note commented 2 years ago

Your setup

Formula commit hash / release tag

nginx-formula v2.6.0

Versions reports (master & minion)

Both master and minon: salt version 3003

Pillar / config used

My nginx.conf is like:

...
http {
  ...
  include snippets/*.cnf
  ...
}

Add this snippet on a second state.highstate run

nginx:
  snippets:
+    global.cnf:
+      - underscore_in_header: 'on'

Bug details

Describe the bug

minion.org.com:
          ID: nginx_snippet_global.cnf
    Function: file.managed
        Name: /usr/local/etc/nginx/snippets/global.cnf
      Result: True
     Comment: File /usr/local/etc/nginx/snippets/global.cnf updated
     Started: 18:52:03.020966
    Duration: 1665.896 ms
     Changes:   
              ----------
              diff:
                  New file
              mode:
                  0644

Summary for minion.org.com
--------------
Succeeded: 143 (changed=1)
Failed:      0
--------------
Total states run:     143
Total run time:    57.696 s

Steps to reproduce the bug

state.apply nginx two times with a new snippet the second time.

Expected behaviour

Reload of nginx service when we add new snippets

Attempts to fix the bug

Additional context