Quellcode durchsuchen

Merge pull request #19 from wdalmut/master

Added mongo extension via pecl and use ppa for php
tags/v0.34.0
Forrest vor 10 Jahren
Ursprung
Commit
3547c933a9
5 geänderte Dateien mit 67 neuen und 1 gelöschten Zeilen
  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 Datei anzeigen

@@ -58,7 +58,7 @@ Installs the php-fpm package, starts the service, and enables it.
Installs the php-gd package.

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

Installs the php-intl package.

@@ -134,6 +134,11 @@ Installs the php-soap package.

Installs the php-suhosin package.

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

Installs the php-mongo package.

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


+ 6
- 0
php/dev.sls Datei anzeigen

@@ -0,0 +1,6 @@
{% from "php/map.jinja" import php with context %}

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

+ 15
- 0
php/init.sls Datei anzeigen

@@ -1,5 +1,20 @@
{% 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:
pkg:
- installed

+ 8
- 0
php/map.jinja Datei anzeigen

@@ -26,6 +26,10 @@
'pgsql_pkg': 'php5-pgsql',
'ldap_pkg': 'php5-ldap',
'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': {
'php_pkg': 'php',
@@ -54,5 +58,9 @@
'pgsql_pkg': 'php-pgsql',
'ldap_pkg': 'php-ldap',
'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')) %}

+ 32
- 0
php/mongo.sls Datei anzeigen

@@ -0,0 +1,32 @@
{% 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

Laden…
Abbrechen
Speichern