Browse Source

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

tags/v0.34.0
Forrest Alvarez 11 years ago
parent
commit
ea5ee43cc6
9 changed files with 67 additions and 57 deletions
  1. +5
    -6
      php/apc.sls
  2. +5
    -7
      php/curl.sls
  3. +8
    -10
      php/fpm.sls
  4. +5
    -7
      php/gd.sls
  5. +5
    -7
      php/init.sls
  6. +24
    -0
      php/map.jinja
  7. +5
    -7
      php/mcrypt.sls
  8. +5
    -7
      php/mysql.sls
  9. +5
    -6
      php/pear.sls

+ 5
- 6
php/apc.sls 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 }}

+ 5
- 7
php/curl.sls 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: {{ curl-pkg }}

+ 8
- 10
php/fpm.sls 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: {{ fpm-pkg }}
service:
- running
- name: {{ fpm-service }}
- enable: True
- order: 455

{% endif %}

+ 5
- 7
php/gd.sls 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: {{ gd-pkg }}

+ 5
- 7
php/init.sls 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-pkg }}

+ 24
- 0
php/map.jinja 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')) $}

+ 5
- 7
php/mcrypt.sls 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: {{ mcrpyt-pkg }}

+ 5
- 7
php/mysql.sls 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: {{ mysql-pkg }}

+ 5
- 6
php/pear.sls 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 : {{ pear-pkg }}

Loading…
Cancel
Save