2016-12-13 22:37:53 +01:00
|
|
|
{%- from "php/map.jinja" import php with context %}
|
2014-08-21 12:22:20 +02:00
|
|
|
|
2016-12-13 22:37:53 +01:00
|
|
|
{%- set version = salt['pillar.get']('php:mongo_version', none) %}
|
2014-08-21 12:22:20 +02:00
|
|
|
|
|
|
|
include:
|
|
|
|
- php
|
2016-12-13 22:37:53 +01:00
|
|
|
- php.xml
|
2014-08-21 12:22:20 +02:00
|
|
|
- php.dev
|
|
|
|
- php.pear
|
|
|
|
|
|
|
|
php-mongo:
|
|
|
|
pecl.installed:
|
|
|
|
- name: {{ php.mongo_pecl }}
|
|
|
|
- defaults: True
|
2016-12-13 22:37:53 +01:00
|
|
|
{%- if version is not none %}
|
2014-08-21 12:22:20 +02:00
|
|
|
- version: {{ version }}
|
2016-12-13 22:37:53 +01:00
|
|
|
{%- endif %}
|
|
|
|
- require:
|
|
|
|
- pkg: {{ php.pear_pkg }}
|
|
|
|
- pkg: build_pkgs
|
|
|
|
|
|
|
|
build_pkgs:
|
|
|
|
pkg.installed:
|
|
|
|
- pkgs: {{ php.build_pkgs }}
|
2014-08-21 12:22:20 +02:00
|
|
|
|
|
|
|
php-mongo-conf:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ php.ext_conf_path }}/mongo.ini
|
|
|
|
- contents: |
|
|
|
|
extension={{ php.mongo_ext }}
|
|
|
|
- require:
|
|
|
|
- pkg: {{ php.php_pkg }}
|
|
|
|
|
2016-12-13 22:37:53 +01:00
|
|
|
{%- if salt['grains.get']('os_family') == "Debian" %}
|
|
|
|
|
2014-08-21 12:22:20 +02:00
|
|
|
php-mongo-enable:
|
|
|
|
cmd.run:
|
2016-12-13 22:37:53 +01:00
|
|
|
- name: {{ php.phpenmod_command }} mongo
|
2014-08-21 12:22:20 +02:00
|
|
|
- require:
|
|
|
|
- file: php-mongo-conf
|
2016-12-13 22:37:53 +01:00
|
|
|
|
|
|
|
{%- endif %}
|