Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
6.3KB

  1. ## php.ng pillar examples
  2. php:
  3. # Use external repository instead the default (only Ubuntu family)
  4. use_external_repo: True
  5. # Set the external repository name (valid only if use_external_repo is not none)
  6. external_repo_name: 'ondrej/php'
  7. # Use Software Collections Repository offering PHP 5.4, 5.5, 5.6, 7.0 and 7.1
  8. # https://www.softwarecollections.org/en/ for more information.
  9. # SCL is only supported on RHEL and CentOS and only active when using php.ng
  10. use_scl_repo: True
  11. # Which PHP version from the SCL repos to use
  12. scl_php_version: 71
  13. # Set the MongoDB driver version. You can specify (optionally) the driver version
  14. # when you add the php.mongo formula to your execution list
  15. mongo_version: "1.5.5"
  16. ng:
  17. # this section contains mostly grain filtered data, while overrides
  18. # are possible in the pillar for unique cases, if your OS is not
  19. # represented, please consider adding it to the map.jinja for
  20. # upstream inclusion
  21. lookup:
  22. enable_php_repo: centos-sclo-rh-testing
  23. # package definitions, these can be strings, lists of strings, or
  24. # lists of dictionaries
  25. pkgs:
  26. memcached: php5-memcached
  27. # ensures both will be installed
  28. curl:
  29. - php-common
  30. - curl
  31. # a dictionary can be used in more complex cases where you want
  32. # to pass forward special arguments to the pkg.installed call
  33. # you MUST include the name argument for this to work
  34. cli:
  35. -
  36. name: php-cli
  37. fromrepo: my-specialrepo
  38. -
  39. name: php-common
  40. skip_verify: True
  41. # php-fpm os-specific settings
  42. fpm:
  43. conf: /location/of/php-fpm/config.conf
  44. ini: /location/of/php-fpm/php.ini
  45. pools: /location/of/php-fpm/pool.d
  46. service: name-of-php5-fpm-service
  47. # the default content of the php5-fpm main config file
  48. defaults:
  49. global:
  50. pid: /var/run/php5-fpm.pid
  51. # php-cli os-specific settings
  52. cli:
  53. ini: /location/of/php-cli/php.ini
  54. # php-fpm settings
  55. fpm:
  56. # settings for the php-fpm service
  57. service:
  58. # if True, enables the php-fpm service, if False disables it
  59. enabled: True
  60. # additional arguments passed forward to
  61. # service.enabled/disabled
  62. opts:
  63. reload: True
  64. # settings for the relevant php-fpm configuration files
  65. config:
  66. # options to manage the php.ini file used by php-fpm
  67. ini:
  68. # arguments passed through to file.managed
  69. opts:
  70. recurse: True
  71. # php.ini file contents that will be merged with the
  72. # defaults in php.ng.ini.defaults. See php.ng.ini.defaults for
  73. # syntax guidelines.
  74. settings:
  75. PHP:
  76. engine: 'Off'
  77. extension_dir: '/usr/lib/php/modules/'
  78. extension: [pdo_mysql.so, iconv.so, openssl.so]
  79. # options to manage the php-fpm conf file
  80. conf:
  81. # arguments passed through to file.managed
  82. opts:
  83. recurse: True
  84. # php-fpm conf file contents that will be merged with
  85. # php.ng.lookup.fpm.defaults. See php.ng.ini.defaults for
  86. # ini-style syntax guidelines.
  87. settings:
  88. global:
  89. pid: /var/run/php-fpm/special-pid.file
  90. # settings for fpm-pools
  91. pools:
  92. # defaults will apply for each pools settings and can be overwritten by pool settings
  93. defaults:
  94. user: nginx
  95. group: nginx
  96. listen: /var/run/php-fpm-default.sock
  97. # name of the pool file to be managed, this will be appended
  98. # to the path specified in php.ng.lookup.fpm.pools
  99. 'mypool.conf':
  100. # If true, the pool file will be managed, if False it will be
  101. # absent
  102. enabled: True
  103. # Overwrite the filename for ext_pillar that doesn't allow
  104. # dots in fields names.
  105. filname: my_other_name.conf
  106. # arguments passed forward to file.managed or file.absent
  107. opts:
  108. replace: False
  109. # pool file contents. See php.ng.ini.defaults for ini-style
  110. # syntax guidelines.
  111. settings:
  112. myapp:
  113. user: www-data
  114. group: www-data
  115. listen: /var/run/php5-fpm-myapp.sock
  116. listen.owner: www-data
  117. listen.group: www-data
  118. listen.mode: 0660
  119. pm: dynamic
  120. pm.max_children: 5
  121. pm.start_servers: 2
  122. pm.min_spare_servers: 1
  123. pm.max_spare_servers: 3
  124. 'php_admin_value[memory_limit]': 300M
  125. # php-cli settings
  126. cli:
  127. # settings to manage the cli's php.ini
  128. ini:
  129. # opts passed forward directly to file.managed
  130. opts:
  131. replace: False
  132. # contents of the php.ini file that are merged with defaults
  133. # from php.ng.ini.defaults. See php.ng.ini.defaults for ini-style
  134. # syntax guidelines
  135. settings:
  136. PHP:
  137. engine: 'Off'
  138. # php-xcache settings
  139. xcache:
  140. ini:
  141. opts: {}
  142. # contents of the xcache.ini file that are merged with defaults
  143. # from php.xcache.ini.defaults. See php.ng.ini.defaults for ini-style
  144. settings:
  145. xcache:
  146. xcache.size: 90M
  147. # global php.ini settings
  148. ini:
  149. # Default php.ini contents. These follow a strict format. The top-
  150. # level dict keys form ini group headings. Nested key/value
  151. # pairs represent setting=value statements. If a value is a list,
  152. # its contents will be joined by commas in final rendering.
  153. defaults:
  154. PHP:
  155. engine: on
  156. output_buffering: 4096
  157. disable_functions:
  158. - pcntl_alarm
  159. - pcntl_fork
  160. - pcntl_wait
  161. 'CLI Server':
  162. cli_server_color: 'On'
  163. # List of modules to install via php.ng.modules
  164. modules:
  165. # Calls `php.ng.<name>` if available, or try to install the matching
  166. # packages that can be set via from php:ng:lookup:pkgs
  167. - cli
  168. - fpm
  169. - curl
  170. - mysql
  171. # When using php.ng.apache2 on FreeBSD:
  172. # Set this to False if you're not using apache-formula
  173. use_apache_formula: True