Add `onlyif` check to execute `a2dissite` only when needed.master
a2dissite {{ id }}{{ apache.confext }}: | a2dissite {{ id }}{{ apache.confext }}: | ||||
cmd: | cmd: | ||||
- run | - run | ||||
- onlyif: test -f /etc/apache2/sites-enabled/{{ id }}{{ apache.confext }} | |||||
- require: | - require: | ||||
- file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} | - file: /etc/apache2/sites-available/{{ id }}{{ apache.confext }} | ||||
- watch_in: | - watch_in: |