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: 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: {{ php.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: {{ php.fpm_pkg }}
service.running: service:
- name: php5-fpm - running
- name: {{ php.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: {{ php.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.php_pkg }}
{% endif %}

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: include:
- apt - apt
{% if grains['os']=="Ubuntu" %}
php-mcrypt: php-mcrypt:
pkg.installed: pkg:
- name: php5-mcrypt - installed
- order: 180 - name: {{ php.mcrypt_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: {{ php.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 : {{ php.pear_pkg }}
{% endif %}