Saltstack Official Linux 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.

9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
8 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
9 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. {% set system = salt['grains.filter_by']({
  2. 'Arch': {
  3. 'pkgs': ['sudo', 'vim', 'wget'],
  4. 'utc': true,
  5. 'user': {},
  6. 'group': {},
  7. 'job': {},
  8. 'limit': {},
  9. 'locale': {},
  10. 'motd': {},
  11. 'env': {},
  12. 'profile': {},
  13. 'proxy': {},
  14. 'repo': {},
  15. 'package': {},
  16. 'autoupdates': {
  17. 'pkgs': []
  18. },
  19. 'selinux': 'permissive',
  20. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  21. 'doc_validity_pkgs': ['python-yaml'],
  22. },
  23. 'Debian': {
  24. 'pkgs': ['python-apt','vim-nox', 'apt-transport-https', 'libmnl0'],
  25. 'utc': true,
  26. 'user': {},
  27. 'group': {},
  28. 'job': {},
  29. 'limit': {},
  30. 'locale': {},
  31. 'motd': {},
  32. 'env': {},
  33. 'profile': {},
  34. 'proxy': {},
  35. 'repo': {},
  36. 'package': {},
  37. 'autoupdates': {
  38. 'pkgs': ['unattended-upgrades']
  39. },
  40. 'selinux': 'permissive',
  41. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  42. 'doc_validity_pkgs': ['python-yaml'],
  43. },
  44. 'RedHat': {
  45. 'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'],
  46. 'utc': true,
  47. 'user': {},
  48. 'group': {},
  49. 'job': {},
  50. 'limit': {},
  51. 'locale': {},
  52. 'motd': {},
  53. 'env': {},
  54. 'profile': {},
  55. 'proxy': {},
  56. 'repo': {},
  57. 'package': {},
  58. 'autoupdates': {
  59. 'pkgs': []
  60. },
  61. 'selinux': 'permissive',
  62. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  63. 'doc_validity_pkgs': ['PyYAML'],
  64. },
  65. }, grain='os_family', merge=salt['pillar.get']('linux:system')) %}
  66. {# 'network_name', #}
  67. {% set interface_params = [
  68. 'gateway',
  69. 'mtu',
  70. 'network',
  71. 'broadcast',
  72. 'master',
  73. 'miimon',
  74. 'ovs_ports',
  75. 'ovs_bridge',
  76. 'mode',
  77. 'port_type',
  78. 'peer',
  79. 'lacp-rate',
  80. 'dns-search',
  81. 'up_cmds',
  82. 'pre_up_cmds',
  83. 'post_up_cmds',
  84. 'down_cmds',
  85. 'pre_down_cmds',
  86. 'post_down_cmds',
  87. 'maxwait',
  88. 'stp',
  89. 'gro',
  90. 'lacp_rate',
  91. 'ad_select',
  92. 'downdelay',
  93. 'updelay',
  94. 'hashing-algorithm',
  95. ] %}
  96. {% set network = salt['grains.filter_by']({
  97. 'Arch': {
  98. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  99. 'bridge_pkgs': ['bridge-utils'],
  100. 'ovs_pkgs': ['openvswitch-switch'],
  101. 'hostname_file': '/etc/hostname',
  102. 'network_manager': False,
  103. 'interface': {},
  104. 'interface_params': interface_params,
  105. 'bridge': 'none',
  106. 'proxy': {
  107. 'host': 'none',
  108. },
  109. 'host': {},
  110. },
  111. 'Debian': {
  112. 'hostname_file': '/etc/hostname',
  113. 'bridge_pkgs': ['bridge-utils'],
  114. 'ovs_pkgs': ['openvswitch-switch', 'bridge-utils'],
  115. 'dpdk_pkgs': ['dpdk', 'dpdk-dev', 'dpdk-dkms', 'dpdk-igb-uio-dkms', 'dpdk-rte-kni-dkms'],
  116. 'network_manager': False,
  117. 'interface': {},
  118. 'interface_params': interface_params,
  119. 'bridge': 'none',
  120. 'proxy': {
  121. 'host': 'none'
  122. },
  123. 'host': {},
  124. },
  125. 'RedHat': {
  126. 'bridge_pkgs': ['bridge-utils'],
  127. 'ovs_pkgs': ['openvswitch-switch', 'bridge-utils'],
  128. 'hostname_file': '/etc/sysconfig/network',
  129. 'network_manager': False,
  130. 'interface': {},
  131. 'interface_params': interface_params,
  132. 'bridge': 'none',
  133. 'proxy': {
  134. 'host': 'none'
  135. },
  136. 'host': {},
  137. },
  138. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  139. {% set storage = salt['grains.filter_by']({
  140. 'Arch': {
  141. 'mount': {},
  142. 'swap': {},
  143. 'lvm': {},
  144. 'loopback': {},
  145. 'nfs': {
  146. 'pkgs': ['nfs-utils']
  147. },
  148. 'multipath': {
  149. 'enabled': False,
  150. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  151. 'service': ''
  152. },
  153. },
  154. 'Debian': {
  155. 'mount': {},
  156. 'swap': {},
  157. 'lvm': {},
  158. 'loopback': {},
  159. 'nfs': {
  160. 'pkgs': ['nfs-common']
  161. },
  162. 'multipath': {
  163. 'enabled': False,
  164. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  165. 'service': 'multipath-tools'
  166. },
  167. 'lvm_pkgs': ['lvm2'],
  168. },
  169. 'RedHat': {
  170. 'mount': {},
  171. 'swap': {},
  172. 'lvm': {},
  173. 'loopback': {},
  174. 'nfs': {
  175. 'pkgs': ['nfs-utils']
  176. },
  177. 'multipath': {
  178. 'enabled': False,
  179. 'pkgs': [],
  180. 'service': 'multipath'
  181. },
  182. },
  183. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}
  184. {% set monitoring = salt['grains.filter_by']({
  185. 'default': {
  186. 'zombie': {
  187. 'warn': 3,
  188. 'crit': 7,
  189. },
  190. 'procs': {
  191. 'warn': 5000,
  192. 'crit': 10000,
  193. },
  194. 'load': {
  195. 'warn': '6,4,2',
  196. 'crit': '12,8,4',
  197. },
  198. 'swap': {
  199. 'warn': '50%',
  200. 'crit': '20%',
  201. },
  202. 'disk': {
  203. 'warn': '15%',
  204. 'crit': '5%',
  205. },
  206. },
  207. }, grain='os_family', merge=salt['pillar.get']('linux:monitoring')) %}