First rework of php formula to bring it up to standards.

This commit is contained in:
Forrest Alvarez 2013-11-27 05:55:10 +00:00
parent 6993687c57
commit ea5ee43cc6
9 changed files with 67 additions and 57 deletions

View File

@ -1,10 +1,9 @@
{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-apc: php-apc:
pkg.installed: pkg:
- order: 180 - installed
- name: {{ php.apc-pkg }}
{% endif %}

View File

@ -1,11 +1,9 @@
{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-curl: php-curl:
pkg.installed: pkg
- name: php5-curl - installed
- order: 180 - name: {{ curl-pkg }}
{% endif %}

View File

@ -1,15 +1,13 @@
{{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-fpm: php-fpm:
pkg.installed: pkg:
- name: php5-fpm - installed
- order: 175 - name: {{ fpm-pkg }}
service.running: service:
- name: php5-fpm - running
- name: {{ fpm-service }}
- enable: True - enable: True
- order: 455
{% endif %}

View File

@ -1,11 +1,9 @@
{{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-gd: php-gd:
pkg.installed: pkg:
- name: php5-gd - installed
- order: 180 - name: {{ gd-pkg }}
{% endif %}

View File

@ -1,11 +1,9 @@
{% from "php/map.jinja import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php: php:
pkg.installed: pkg:
- name: php5 - installed
- order: 175 - name: {{ php-pkg }}
{% endif %}

24
php/map.jinja Normal file
View File

@ -0,0 +1,24 @@
{% set map = salt['grains.filter_by']({
'Ubuntu': {
'php-pkg': 'php5',
'apc-pkg': 'php-apc',
'curl-pkg': 'php-curl',
'fpm-pkg': 'php5-fpm',
'gd-pkg': 'php5-gd',
'mcrypt-pkg': 'php5-mcrypt',
'mysql-pkg': 'php5-mysql',
'pear-pkg': ' php-pear',
'fpm-service': 'php5-fpm',
},
'RedHat': {
'php-pkg': 'php5',
'apc-pkg': 'php-apc',
'curl-pkg': 'php-curl',
'fpm-pkg': 'php5-fpm',
'gd-pkg': 'php5-gd',
'mcrypt-pkg': 'php5-mcrypt',
'mysql-pkg': 'php5-mysql',
'pear-pkg': ' php-pear',
'fpm-service': 'php5-fpm',
},
}, merge=salt['pillar.get']('php:lookup')) $}

View File

@ -1,11 +1,9 @@
{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-mcrypt: php-mcrypt:
pkg.installed: pkg:
- name: php5-mcrypt - installed
- order: 180 - name: {{ mcrpyt-pkg }}
{% endif %}

View File

@ -1,11 +1,9 @@
{% from "php/map.jinja import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-mysql: php-mysql:
pkg.installed: pkg:
- name: php5-mysql - installed
- order: 180 - name: {{ mysql-pkg }}
{% endif %}

View File

@ -1,10 +1,9 @@
{% from "php/map.jinja" import php with context %}
include: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-pear: php-pear:
pkg.installed: pkg:
- order: 180 - installed
- name : {{ pear-pkg }}
{% endif %}