Don't execute a2dissite
on each state run
Add `onlyif` check to execute `a2dissite` only when needed.
This commit is contained in:
parent
92cc127bfe
commit
ff2dd397c3
@ -43,6 +43,7 @@ a2ensite {{ id }}{{ apache.confext }}:
|
||||
a2dissite {{ id }}{{ apache.confext }}:
|
||||
cmd:
|
||||
- run
|
||||
- onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }}
|
||||
- require:
|
||||
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }}
|
||||
- watch_in:
|
||||
|
Loading…
Reference in New Issue
Block a user