Advertisement
Guest User

Untitled

a guest
Aug 13th, 2015
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.10 KB | None | 0 0
  1. {% from "php/map.jinja" import php with context %}
  2.  
  3. include:
  4.  - php
  5.   - newrelic
  6.  
  7. php-fpm:
  8.   pkg.installed:
  9.     - name: {{ php.php_fpm_pkg }}
  10.     - refresh: True
  11.     - version: {{ salt['pillar.get']('php:lookup:config:version') }}
  12.     {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
  13.     - watch:
  14.      {% if grains['os'] == 'Debian' %}
  15.       - pkgrepo: dotdeb
  16.       {% endif %}
  17.       - pkg: php-cli
  18.       - file: /etc/apt/preferences.d/php
  19.     {% endif %}
  20.   file.recurse:
  21.     - name: {{ php.configdir }}
  22.     - source: {{ salt['pillar.get']('php:lookup:config:conf_tmpl') }}
  23.     - template: jinja
  24.     - user: root
  25.     - include_empty: True
  26.     - context:
  27.       - newrelic_appname: {{ salt['pillar.get']('newrelic:lookup:config:appname') }}
  28.       - newrelic_license: {{ salt['pillar.get']('newrelic:lookup:config:license') }}
  29.       - memcached_ip: 10.0.2.5
  30.       - memcached_port: 11211
  31.     - watch_in:
  32.       - service: php-fpm
  33.   service.running:
  34.     - name: {{ php.php_fpm_service }}
  35.     - enable: True
  36.     - watch:
  37.       - pkg: {{ php.php_fpm_pkg }}
  38.       - sls: newrelic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement