Saltstack Official PHP Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

268 linhas
9.7KB

  1. {% set php = salt['pillar.get']('php:ng', {
  2. 'lookup': salt['grains.filter_by']({
  3. 'Debian': {
  4. 'pkgs': {
  5. 'php': 'php5',
  6. 'apc': 'php-apc',
  7. 'cgi': 'php5-cgi',
  8. 'cli': 'php5-cli',
  9. 'curl': 'php5-curl',
  10. 'fpm': 'php5-fpm',
  11. 'gd': 'php5-gd',
  12. 'mbstring': 'php5',
  13. 'mcrypt': 'php5-mcrypt',
  14. 'memcache': 'php5-memcache',
  15. 'memcached': 'php5-memcached',
  16. 'mysql': 'php5-mysql',
  17. 'mysqlnd': 'php5-mysqlnd',
  18. 'pear': ' php-pear',
  19. 'soap': ' php-soap',
  20. 'xml': ' php5-xml',
  21. 'imagick': 'php5-imagick',
  22. 'suhosin': 'php5-suhosin',
  23. 'imap': 'php5-imap',
  24. 'adodb': 'php5-adodb',
  25. 'pgsql': 'php5-pgsql',
  26. 'ldap': 'php5-ldap',
  27. },
  28. 'fpm': {
  29. 'conf': '/etc/php5/fpm/php-fpm.conf',
  30. 'ini': '/etc/php5/fpm/php.ini',
  31. 'pools': '/etc/php5/fpm/pool.d',
  32. 'service': 'php5-fpm',
  33. 'defaults': odict([
  34. ('global', odict([
  35. ('pid', '/var/run/php5-fpm.pid'),
  36. ('error_log', '/var/log/php5-fpm.log'),
  37. ('include', '/etc/php5/fpm/pool.d/*.conf'),
  38. ])),
  39. ]),
  40. },
  41. 'apache2_mod_php_ini': '/etc/php5/apache2/php.ini',
  42. },
  43. 'RedHat': {
  44. 'pkgs': {
  45. 'php': 'php',
  46. 'apc': 'php-pecl-apc',
  47. 'cgi': 'php-cgi',
  48. 'cli': 'php-cli',
  49. 'curl': 'curl',
  50. 'fpm': 'php-fpm',
  51. 'gd': 'php-gd',
  52. 'mbstring': 'php-mbstring',
  53. 'mcrypt': 'php-mcrypt',
  54. 'memcache': 'php-pecl-memcache',
  55. 'memcached': 'php-pecl-memcached',
  56. 'mysql': 'php-mysql',
  57. 'mysqlnd': 'php-mysqlnd',
  58. 'pear': ' php-pear',
  59. 'soap': ' php-soap',
  60. 'xml': ' php-xml',
  61. 'imagick': 'php-imagick',
  62. 'suhosin': 'php-suhosin',
  63. 'imap': 'php-imap',
  64. 'adodb': 'php-adodb',
  65. 'pgsql': 'php-pgsql',
  66. 'ldap': 'php-ldap',
  67. },
  68. 'fpm': {
  69. 'conf': '/etc/php-fpm.conf',
  70. 'ini': '/etc/php.ini',
  71. 'pools': '/etc/php-fpm.d',
  72. 'service': 'php-fpm',
  73. 'defaults': {
  74. 'global': {
  75. 'pid': '/var/run/php-fpm/php-fpm.pid',
  76. 'error_log': '/var/log/php-fpm/error.log',
  77. 'include': '/etc/php-fpm.d/*.conf',
  78. },
  79. },
  80. },
  81. 'apache2_mod_php_ini': '/etc/php.ini',
  82. },
  83. }),
  84. 'installed': {},
  85. 'fpm': {
  86. 'service': {
  87. 'enabled': True,
  88. 'opts': {},
  89. },
  90. 'config': {
  91. 'ini': {
  92. 'opts': {},
  93. 'settings': {},
  94. },
  95. 'conf': {
  96. 'opts': {},
  97. 'settings': {},
  98. },
  99. },
  100. 'pools': {
  101. 'managed_opts': {},
  102. 'absent_opts': {},
  103. 'managed': {},
  104. },
  105. },
  106. 'ini': {
  107. 'defaults': {
  108. 'PHP': {
  109. 'engine': 'On',
  110. 'short_open_tag': 'Off',
  111. 'asp_tags': 'Off',
  112. 'precision': 14,
  113. 'output_buffering': 4096,
  114. 'zlib.output_compression': 'Off',
  115. 'implicit_flush': 'Off',
  116. 'serialize_precision': 17,
  117. 'disable_functions': ['pcntl_alarm','pcntl_fork','pcntl_waitpid','pcntl_wait','pcntl_wifexited','pcntl_wifstopped','pcntl_wifsignaled',
  118. 'pcntl_wexitstatus','pcntl_wtermsig','pcntl_wstopsig','pcntl_signal','pcntl_signal_dispatch','pcntl_get_last_error','pcntl_strerror',
  119. 'pcntl_sigprocmask','pcntl_sigwaitinfo','pcntl_sigtimedwait','pcntl_exec','pcntl_getpriority','pcntl_setpriority'],
  120. 'zend.enable_gc': 'On',
  121. 'expose_php': 'On',
  122. 'max_execution_time': 30,
  123. 'max_input_time': 60,
  124. 'max_input_nesting_level': 64,
  125. 'max_input_vars': 1000,
  126. 'memory_limit': '128M',
  127. 'error_reporting': ['E_ALL', '~E_DEPRECATED', '~E_STRICT'],
  128. 'display_errors': 'Off',
  129. 'display_startup_errors': 'Off',
  130. 'log_errors': 'On',
  131. 'log_errors_max_len': 1024,
  132. 'ignore_repeated_errors': 'Off',
  133. 'ignore_repeated_source': 'Off',
  134. 'report_memleaks': 'On',
  135. 'track_errors': 'Off',
  136. 'html_errors': 'On',
  137. 'variables_order': 'GPCS',
  138. 'request_order': 'GP',
  139. 'register_argc_argv': 'Off',
  140. 'auto_globals_jit': 'On',
  141. 'post_max_size': '8M',
  142. 'default_mimetype': '"text/html"',
  143. 'enable_dl': 'Off',
  144. 'file_uploads': 'On',
  145. 'upload_max_filesize': '2M',
  146. 'max_file_uploads': 20,
  147. 'allow_url_fopen': 'On',
  148. 'allow_url_include': 'Off',
  149. 'default_socket_timeout': 60
  150. },
  151. 'CLI Server': {
  152. 'cli_server.color': 'On'
  153. },
  154. 'Date': {
  155. 'date.timezone': 'America/New_York'
  156. },
  157. 'Pdo_mysql': {
  158. 'pdo_mysql.cache_size': 2000
  159. },
  160. 'mail function': {
  161. 'SMTP': 'localhost',
  162. 'mail.add_x_header': 'On'
  163. },
  164. 'SQL': {
  165. 'sql.safe_mode': 'Off'
  166. },
  167. 'ODBC': {
  168. 'odbc.allow_persistent': 'On',
  169. 'odbc.check_persistent': 'On',
  170. 'odbc.max_persistent': '-1',
  171. 'odbc.max_links': '-1',
  172. 'odbc.defaultlrl': 4096,
  173. 'odbc.defaultbinmode': 1
  174. },
  175. 'Interbase': {
  176. 'ibase.allow_persistent': 1,
  177. 'ibase.max_persistent': -1,
  178. 'ibase.max_links': -1,
  179. 'ibase.timestampformat': '"%Y-%m-%d %H:%M:%S"',
  180. 'ibase.dateformat': '"%Y-%m-%d"',
  181. 'ibase.timeformat': '"%H:%M:%S"'
  182. },
  183. 'MySQL': {
  184. 'mysql.allow_local_infile': 'On',
  185. 'mysql.allow_persistent': 'On',
  186. 'mysql.cache_size': '2000',
  187. 'mysql.max_persistent': -1,
  188. 'mysql.max_links': -1,
  189. 'mysql.connect_timeout': 60,
  190. 'mysql.trace_mode': 'Off'
  191. },
  192. 'MySQLi': {
  193. 'mysqli.max_persistent': -1,
  194. 'mysqli.allow_persistent': 'On',
  195. 'mysqli.max_links': -1,
  196. 'mysqli.cache_size': 2000,
  197. 'mysqli.default_port': 3306,
  198. 'mysqli.reconnect': 'Off'
  199. },
  200. 'mysqlnd': {
  201. 'mysqlnd.collect_statistics': 'On',
  202. 'mysqlnd.collect_memory_statistics': 'Off'
  203. },
  204. 'PostgreSQL': {
  205. 'pgsql.allow_persistent': 'On',
  206. 'pgsql.auto_reset_persistent': 'Off',
  207. 'pgsql.max_persistent': -1,
  208. 'pgsql.max_links': -1,
  209. 'pgsql.ignore_notice': 0,
  210. 'pgsql.log_notice': 0
  211. },
  212. 'Sybase-CT': {
  213. 'sybct.allow_persistent': 'On',
  214. 'sybct.max_persistent': -1,
  215. 'sybct.max_links': -1,
  216. 'sybct.min_server_severity': 10,
  217. 'sybct.min_client_severity': 10
  218. },
  219. 'bcmath': {
  220. 'bcmath.scale': 0
  221. },
  222. 'Session': {
  223. 'session.save_handler': 'files',
  224. 'session.use_strict_mode': 0,
  225. 'session.use_cookies': 1,
  226. 'session.use_only_cookies': 1,
  227. 'session.name': 'PHPSESSID',
  228. 'session.auto_start': 0,
  229. 'session.cookie_lifetime': 0,
  230. 'session.cookie_path': '/',
  231. 'session.serialize_handler': 'php',
  232. 'session.gc_probability': 0,
  233. 'session.gc_divisor': 1000,
  234. 'session.gc_maxlifetime': 1440,
  235. 'session.bug_compat_42': 'Off',
  236. 'session.bug_compat_warn': 'Off',
  237. 'session.cache_limiter': 'nocache',
  238. 'session.cache_expire': '180',
  239. 'session.use_trans_sid': 0,
  240. 'session.hash_function': 0,
  241. 'session.hash_bits_per_character': 5,
  242. 'url_rewriter.tags': '"a=href,area=href,frame=src,input=src,form=fakeentry"'
  243. },
  244. 'MSSQL': {
  245. 'mssql.allow_persistent': 'On',
  246. 'mssql.max_persistent': -1,
  247. 'mssql.max_links': -1,
  248. 'mssql.min_error_severity': 10,
  249. 'mssql.min_message_severity': 10,
  250. 'mssql.compatibility_mode': 'Off',
  251. 'mssql.secure_connection': 'Off'
  252. },
  253. 'Tidy': {
  254. 'tidy.clean_output': 'Off'
  255. },
  256. 'soap': {
  257. 'soap.wsdl_cache_enabled': 1,
  258. 'soap.wsdl_cache_dir': '"/tmp"',
  259. 'soap.wsdl_cache_ttl': 86400,
  260. 'soap.wsdl_cache_limit': 5
  261. },
  262. 'ldap': {
  263. 'ldap.max_links': -1
  264. },
  265. },
  266. },
  267. }, merge=True) %}