From effba317fdb96a7576116174f92d9faf2a652e69 Mon Sep 17 00:00:00 2001 From: Seth House Date: Tue, 13 Aug 2013 14:30:49 -0600 Subject: [PATCH] Updated Debian-family formula to work on all Debian-family OSes --- apache/debian_full.sls | 5 +++-- apache/fcgid.sls | 4 ++-- apache/php5.sls | 4 ++-- apache/register_site.sls | 3 +++ apache/rewrite.sls | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apache/debian_full.sls b/apache/debian_full.sls index 2e3dd6f..0f90a3c 100644 --- a/apache/debian_full.sls +++ b/apache/debian_full.sls @@ -1,9 +1,10 @@ +{% if grains['os_family']=="Debian" %} + include: - apt - apache - apache.register_site -{% if grains['os']=="Ubuntu" %} extend: apache: pkg: @@ -42,4 +43,4 @@ apache-restart: - require: - pkg: apache -{% endif %} #END: os = ubuntu +{% endif %} #END: os = debian diff --git a/apache/fcgid.sls b/apache/fcgid.sls index 895cffe..12bbbd0 100644 --- a/apache/fcgid.sls +++ b/apache/fcgid.sls @@ -1,8 +1,8 @@ +{% if grains['os_family']=="Debian" %} + include: - apt -{% if grains['os']=="Ubuntu" %} - mod-fcgid: pkg.installed: - name: libapache2-mod-fcgid diff --git a/apache/php5.sls b/apache/php5.sls index b6b5710..ac28e87 100644 --- a/apache/php5.sls +++ b/apache/php5.sls @@ -1,8 +1,8 @@ +{% if grains['os_family']=="Debian" %} + include: - apt -{% if grains['os']=="Ubuntu" %} - mod-php5: pkg.installed: - name: libapache2-mod-php5 diff --git a/apache/register_site.sls b/apache/register_site.sls index 65eb618..1e6920f 100644 --- a/apache/register_site.sls +++ b/apache/register_site.sls @@ -1,3 +1,5 @@ +{% if grains['os_family']=="Debian" %} + {% if 'apache' in pillar and 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] {% for site in pillar['apache']['register-site'] %} @@ -44,3 +46,4 @@ a2dissite {{ pillar['apache']['register-site'][site]['name'] }}: {% endfor %} {% endif %} #END: apache-register-site +{% endif %} #END: grains['os_family'] == debian diff --git a/apache/rewrite.sls b/apache/rewrite.sls index 958c74a..51099f5 100644 --- a/apache/rewrite.sls +++ b/apache/rewrite.sls @@ -1,8 +1,8 @@ +{% if grains['os_family']=="Debian" %} + include: - apt -{% if grains['os']=="Ubuntu" %} - a2enmod rewrite: cmd.run: - unless: ls /etc/apache2/mods-enabled/rewrite.load