Browse Source

Added mongo extension via pecl and use ppa for php

tags/v0.34.0
Walter Dal Mut 10 years ago
parent
commit
d14b686e5e
5 changed files with 67 additions and 1 deletions
  1. +6
    -1
      README.rst
  2. +6
    -0
      php/dev.sls
  3. +15
    -0
      php/init.sls
  4. +8
    -0
      php/map.jinja
  5. +32
    -0
      php/mongo.sls

+ 6
- 1
README.rst View File

Installs the php-gd package. Installs the php-gd package.


``php.intl`` ``php.intl``
----------
------------


Installs the php-intl package. Installs the php-intl package.




Installs the php-suhosin package. Installs the php-suhosin package.


``php.mongo``
-------------

Installs the php-mongo package.

``php.xml`` ``php.xml``
----------- -----------



+ 6
- 0
php/dev.sls View File

{% from "php/map.jinja" import php with context %}

php-dev:
pkg:
- installed
- name: {{ php.dev_pkg }}

+ 15
- 0
php/init.sls View File

{% from "php/map.jinja" import php with context %} {% from "php/map.jinja" import php with context %}


{% if grains['os_family']=="Debian" %}
{% if use_ppa is not none %}

{% set use_ppa = salt['pillar.get']('php:use_ppa', none) %}
{% set ppa_name = salt['pillar.get']('php:ppa_name', 'ondrej/php5') %}

php54:
pkgrepo.managed:
- ppa: {{ ppa_name }}
pkg.latest:
- name: php5
- refresh: True
{% endif %}
{% endif %}

php: php:
pkg: pkg:
- installed - installed

+ 8
- 0
php/map.jinja View File

'pgsql_pkg': 'php5-pgsql', 'pgsql_pkg': 'php5-pgsql',
'ldap_pkg': 'php5-ldap', 'ldap_pkg': 'php5-ldap',
'php_ini': '/etc/php5/apache2/php.ini', 'php_ini': '/etc/php5/apache2/php.ini',
'dev_pkg': 'php5-dev',
'mongo_pecl': 'mongo',
'mongo_ext': 'mongo.so',
'ext_conf_path': '/etc/php5/mods-available',
}, },
'RedHat': { 'RedHat': {
'php_pkg': 'php', 'php_pkg': 'php',
'pgsql_pkg': 'php-pgsql', 'pgsql_pkg': 'php-pgsql',
'ldap_pkg': 'php-ldap', 'ldap_pkg': 'php-ldap',
'php_ini': '/etc/php.ini', 'php_ini': '/etc/php.ini',
'dev_pkg': 'php-dev',
'mongo_pecl': 'mongo',
'mongo_ext': 'mongo.so',
'ext_conf_path': '/etc/php5/conf.d',
}, },
}, merge=salt['pillar.get']('php:lookup')) %} }, merge=salt['pillar.get']('php:lookup')) %}

+ 32
- 0
php/mongo.sls View File

{% from "php/map.jinja" import php with context %}

{% set version = salt['pillar.get']('php:mongo_version', none) %}

include:
- php
- php.dev
- php.pear

php-mongo:
pecl.installed:
- name: {{ php.mongo_pecl }}
- require:
- pkg: {{ php.pear_pkg }}
- defaults: True
{% if version is not none %}
- version: {{ version }}
{% endif %}

php-mongo-conf:
file.managed:
- name: {{ php.ext_conf_path }}/mongo.ini
- contents: |
extension={{ php.mongo_ext }}
- require:
- pkg: {{ php.php_pkg }}

php-mongo-enable:
cmd.run:
- name: php5enmod mongo
- require:
- file: php-mongo-conf

Loading…
Cancel
Save