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.

map.jinja 10KB

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