From a3299dc1eb1bb5a9c120989d21a61e42ec2be593 Mon Sep 17 00:00:00 2001 From: Michal Galet Date: Sat, 4 Jan 2014 11:59:39 +0000 Subject: [PATCH] States for apache-reload and apache-restart using module.wait not working --- apache/debian_full.sls | 2 +- apache/init.sls | 7 ++++--- apache/register_site.sls | 2 +- apache/vhosts/standard.sls | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apache/debian_full.sls b/apache/debian_full.sls index 19fe76b..a575279 100644 --- a/apache/debian_full.sls +++ b/apache/debian_full.sls @@ -17,7 +17,7 @@ a2dissite 000-default: - order: 225 - onlyif: ls /etc/apache2/sites-enabled/000-default - watch_in: - - cmd: apache-reload + - module: apache-reload - require: - pkg: apache diff --git a/apache/init.sls b/apache/init.sls index ed4b5cc..9deec2b 100644 --- a/apache/init.sls +++ b/apache/init.sls @@ -11,9 +11,10 @@ apache: apache-reload: module.wait: - - name: service.reload {{ apache.service }} + - name: service.reload + - m_name: {{ apache.service }} apache-restart: module.wait: - - name: service.restart {{ apache.service }} - + - name: service.restart + - m_name: {{ apache.service }} \ No newline at end of file diff --git a/apache/register_site.sls b/apache/register_site.sls index 1e6920f..e5a4129 100644 --- a/apache/register_site.sls +++ b/apache/register_site.sls @@ -39,7 +39,7 @@ a2dissite {{ pillar['apache']['register-site'][site]['name'] }}: - mode: 775 - watch_in: - cmd: a2ensite {{ pillar['apache']['register-site'][site]['name'] }} - - cmd: apache-reload + - module: apache-reload {% endif %} ########################################## diff --git a/apache/vhosts/standard.sls b/apache/vhosts/standard.sls index 841580b..6e04ffc 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -18,7 +18,7 @@ include: - require: - pkg: apache - watch_in: - - cmd: apache-reload + - module: apache-reload {% if grains.os_family == 'Debian' %} a2ensite {{ id }}: