Merge pull request #3 from gravyboat/master

Added required content for map.
This commit is contained in:
Seth House 2014-01-02 10:00:02 -08:00
commit 1fd0a69821
9 changed files with 67 additions and 57 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

24
php/map.jinja Normal file
View File

@ -0,0 +1,24 @@
{% set php = salt['grains.filter_by']({
'Debian': {
'php_pkg': 'php5',
'apc_pkg': 'php-apc',
'curl_pkg': 'php5-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': 'php',
'apc_pkg': 'php-pecl-apc',
'curl_pkg': 'curl',
'fpm_pkg': 'php-fpm',
'gd_pkg': 'php-gd',
'mcrypt_pkg': 'php-mcrypt',
'mysql_pkg': 'php-mysql',
'pear_pkg': ' php-pear',
'fpm_service': 'php-fpm',
},
}, merge=salt['pillar.get']('php:lookup')) %}

View File

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

View File

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

View File

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