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.

280 lines
8.3KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. ## php pillar examples
  5. php:
  6. # Use the following values to mute deprecation warnings
  7. warning_messages:
  8. v1.0.0:
  9. mute_critical: true
  10. mute_upcoming: true
  11. # Use external repository instead the default (only Ubuntu family)
  12. use_external_repo: true
  13. # Set the external repository name (valid only if use_external_repo is not none)
  14. external_repo_name: 'ondrej/php'
  15. # Use Software Collections Repository offering PHP 5.4, 5.5, 5.6, 7.0 and 7.1
  16. # https://www.softwarecollections.org/en/ for more information.
  17. # SCL is only supported on RHEL and CentOS
  18. use_scl_repo: true
  19. # Which PHP version from the SCL repos to use
  20. scl_php_version: 71
  21. # Set the MongoDB driver version. You can specify (optionally) the driver version
  22. # when you add the php.mongo formula to your execution list
  23. mongo_version: "1.5.5"
  24. # set the version of php to be used
  25. version: "7.3"
  26. # can be a list of versions :
  27. # version:
  28. # - "7.3"
  29. # - "7.2"
  30. # set the version for the Debian alternatives system, when using a list of versions,
  31. # php:version is used otherwise.
  32. alternatives_version: "7.3"
  33. # this section contains mostly grain filtered data, while overrides
  34. # are possible in the pillar for unique cases, if your OS is not
  35. # represented, please consider adding it to the map.jinja for
  36. # upstream inclusion
  37. lookup:
  38. enable_php_repo: centos-sclo-rh-testing
  39. # package definitions, these can be strings, lists of strings, or
  40. # lists of dictionaries
  41. pkgs:
  42. memcached: php5-memcached
  43. # ensures both will be installed
  44. curl:
  45. - php-common
  46. - curl
  47. # a dictionary can be used in more complex cases where you want
  48. # to pass forward special arguments to the pkg.installed call
  49. # you MUST include the name argument for this to work
  50. cli:
  51. -
  52. name: php-cli
  53. fromrepo: my-specialrepo
  54. -
  55. name: php-common
  56. skip_verify: true
  57. # php-fpm os-specific settings
  58. fpm:
  59. conf: /location/of/php-fpm/config.conf
  60. ini: /location/of/php-fpm/php.ini
  61. pools: /location/of/php-fpm/pool.d
  62. service: name-of-php5-fpm-service
  63. # the default content of the php5-fpm main config file
  64. defaults:
  65. global:
  66. pid: /var/run/php5-fpm.pid
  67. # php-cli os-specific settings
  68. cli:
  69. ini: /location/of/php-cli/php.ini
  70. # php.composer
  71. # Some OS need modules to be installed
  72. composer:
  73. required_modules:
  74. - filter
  75. - json
  76. - mbstring
  77. - openssl
  78. - phar
  79. # php-fpm settings
  80. fpm:
  81. # settings for the php-fpm service
  82. service:
  83. # if true, enables the php-fpm service, if false disables it
  84. enabled: true
  85. # additional arguments passed forward to
  86. # service.enabled/disabled
  87. opts:
  88. reload: true
  89. # settings for the relevant php-fpm configuration files
  90. config:
  91. # options to manage the php.ini file used by php-fpm
  92. ini:
  93. # arguments passed through to file.managed
  94. opts:
  95. recurse: true
  96. # php.ini file contents that will be merged with the
  97. # defaults in php.ini.defaults. See php.ini.defaults for
  98. # syntax guidelines.
  99. settings:
  100. PHP:
  101. engine: 'Off'
  102. extension_dir: '/usr/lib/php/modules/'
  103. extension: [pdo_mysql.so, iconv.so, openssl.so]
  104. # if a list of versions is set in php:version, each version
  105. # may have different settings
  106. # '7.2':
  107. # PHP:
  108. # short_open_tag: 'On'
  109. # options to manage the php-fpm conf file
  110. conf:
  111. # arguments passed through to file.managed
  112. opts:
  113. recurse: true
  114. # php-fpm conf file contents that will be merged with
  115. # php.lookup.fpm.defaults. See php.ini.defaults for
  116. # ini-style syntax guidelines.
  117. settings:
  118. global:
  119. pid: /var/run/php-fpm/special-pid.file
  120. # settings for fpm-pools
  121. pools:
  122. # defaults will apply for each pools settings and can be overwritten
  123. # by pool settings
  124. defaults:
  125. user: nginx
  126. group: nginx
  127. listen: /var/run/php-fpm-default.sock
  128. # name of the pool file to be managed, this will be appended
  129. # to the path specified in php.lookup.fpm.pools
  130. 'mypool.conf':
  131. # If true, the pool file will be managed, if false it will be
  132. # absent
  133. enabled: true
  134. # Overwrite the filename for ext_pillar that doesn't allow
  135. # dots in fields names.
  136. filname: my_other_name.conf
  137. # arguments passed forward to file.managed or file.absent
  138. opts:
  139. replace: false
  140. # If using multiple php versions, force the pool to use a specific one
  141. phpversion: "7.2"
  142. # pool file contents. See php.ini.defaults for ini-style
  143. # syntax guidelines.
  144. settings:
  145. myapp:
  146. user: www-data
  147. group: www-data
  148. listen: /var/run/php5-fpm-myapp.sock
  149. listen.owner: www-data
  150. listen.group: www-data
  151. listen.mode: '0660'
  152. pm: dynamic
  153. pm.max_children: 5
  154. pm.start_servers: 2
  155. pm.min_spare_servers: 1
  156. pm.max_spare_servers: 3
  157. 'php_admin_value[memory_limit]': 300M
  158. # php-cli settings
  159. cli:
  160. # settings to manage the cli's php.ini
  161. ini:
  162. # opts passed forward directly to file.managed
  163. opts:
  164. replace: false
  165. # contents of the php.ini file that are merged with defaults
  166. # from php.ini.defaults. See php.ini.defaults for ini-style
  167. # syntax guidelines
  168. settings:
  169. PHP:
  170. engine: 'Off'
  171. # if a list of versions is set in php:version, each version
  172. # may have different settings
  173. # '7.2':
  174. # PHP:
  175. # short_open_tag: 'On'
  176. # php-xcache settings
  177. xcache:
  178. ini:
  179. opts: {}
  180. # contents of the xcache.ini file that are merged with defaults
  181. # from php.xcache.ini.defaults. See php.ini.defaults for ini-style
  182. settings:
  183. xcache:
  184. xcache.size: 90M
  185. # global php.ini settings
  186. ini:
  187. # Default php.ini contents. These follow a strict format. The top-
  188. # level dict keys form ini group headings. Nested key/value
  189. # pairs represent setting=value statements. If a value is a list,
  190. # its contents will be joined by commas in final rendering.
  191. defaults:
  192. PHP:
  193. engine: 'On'
  194. output_buffering: 4096
  195. disable_functions:
  196. - pcntl_alarm
  197. - pcntl_fork
  198. - pcntl_wait
  199. 'CLI Server':
  200. cli_server_color: 'On'
  201. # List of modules to install via php.modules
  202. modules:
  203. # Calls `php.<name>` if available, or try to install the matching
  204. # packages that can be set via from php:lookup:pkgs
  205. - cli
  206. - fpm
  207. - curl
  208. - mysql
  209. # When using php.apache2 on FreeBSD:
  210. # Set this to false if you're not using apache-formula
  211. use_apache_formula: true
  212. tofs:
  213. # The files_switch key serves as a selector for alternative
  214. # directories under the formula files directory. See TOFS pattern
  215. # doc for more info.
  216. # Note: Any value not evaluated by `config.get` will be used literally.
  217. # This can be used to set custom paths, as many levels deep as required.
  218. # files_switch:
  219. # - any/path/can/be/used/here
  220. # - id
  221. # - role
  222. # - osfinger
  223. # - os
  224. # - os_family
  225. # All aspects of path/file resolution are customisable using the options below.
  226. # This is unnecessary in most cases; there are sensible defaults.
  227. # path_prefix: template_alt
  228. # dirs:
  229. # files: files_alt
  230. # default: default_alt
  231. source_files:
  232. php_apache2_ini:
  233. - alt_php.ini
  234. php_apache2_module_config:
  235. - alt_mod_php.conf.jinja
  236. php_cli_ini: # Used if there is only one version declared
  237. - alt_php.ini
  238. php_cli_ini_7.2: # Used if several versions are declared
  239. - alt_php.ini
  240. php_fpm_conf_config:
  241. - alt_php.ini
  242. php_fpm_conf_config_7.3:
  243. - alt_php.ini
  244. php_fpm_ini_config:
  245. - alt_php.ini
  246. php_fpm_ini_config_7.0:
  247. - alt_php.ini
  248. php_fpm_pool_conf:
  249. - alt_php.ini
  250. php_hhvm_conf_config:
  251. - alt_php.ini
  252. php_hhvm_ini_config:
  253. - alt_php.ini
  254. php_xcache_ini:
  255. - alt_php.ini