From ff2dd397c3d7f030b5b0474743374ad8479827b1 Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Fri, 25 Sep 2015 09:34:28 +0200 Subject: [PATCH] Don't execute `a2dissite` on each state run Add `onlyif` check to execute `a2dissite` only when needed. --- apache/vhosts/standard.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/apache/vhosts/standard.sls b/apache/vhosts/standard.sls index 7d117c1..8b78f0c 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -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: