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.

200 satır
6.4KB

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