Saltstack Official Linux Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. 'repo': {},
  12. 'package': {},
  13. 'selinux': 'permissive',
  14. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  15. 'doc_validity_pkgs': ['python-yaml'],
  16. },
  17. 'Debian': {
  18. 'pkgs': ['python-apt','vim-nox', 'apt-transport-https', 'libmnl0'],
  19. 'utc': true,
  20. 'user': {},
  21. 'group': {},
  22. 'job': {},
  23. 'limit': {},
  24. 'locale': {},
  25. 'motd': {},
  26. 'repo': {},
  27. 'package': {},
  28. 'selinux': 'permissive',
  29. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  30. 'doc_validity_pkgs': ['python-yaml'],
  31. },
  32. 'RedHat': {
  33. 'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'],
  34. 'utc': true,
  35. 'user': {},
  36. 'group': {},
  37. 'job': {},
  38. 'limit': {},
  39. 'locale': {},
  40. 'motd': {},
  41. 'repo': {},
  42. 'package': {},
  43. 'selinux': 'permissive',
  44. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  45. 'doc_validity_pkgs': ['PyYAML'],
  46. },
  47. }, grain='os_family', merge=salt['pillar.get']('linux:system')) %}
  48. {# 'network_name', #}
  49. {% set interface_params = [
  50. 'gateway',
  51. 'mtu',
  52. 'network',
  53. 'broadcast',
  54. 'master',
  55. 'miimon',
  56. 'mode',
  57. 'lacp-rate',
  58. 'dns-search',
  59. 'up_cmds',
  60. 'pre_up_cmds',
  61. 'post_up_cmds',
  62. 'down_cmds',
  63. 'pre_down_cmds',
  64. 'post_down_cmds',
  65. 'maxwait',
  66. 'stp',
  67. 'gro',
  68. ] %}
  69. {% set network = salt['grains.filter_by']({
  70. 'Arch': {
  71. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  72. 'bridge_pkgs': ['bridge-utils'],
  73. 'ovs_pkgs': ['openvswitch-switch'],
  74. 'hostname_file': '/etc/hostname',
  75. 'network_manager': False,
  76. 'interface': {},
  77. 'interface_params': interface_params,
  78. 'bridge': 'none',
  79. 'proxy': {
  80. 'host': 'none',
  81. },
  82. 'host': {},
  83. },
  84. 'Debian': {
  85. 'hostname_file': '/etc/hostname',
  86. 'bridge_pkgs': ['bridge-utils'],
  87. 'ovs_pkgs': ['openvswitch-switch'],
  88. 'network_manager': False,
  89. 'interface': {},
  90. 'interface_params': interface_params,
  91. 'bridge': 'none',
  92. 'proxy': {
  93. 'host': 'none',
  94. },
  95. 'host': {},
  96. },
  97. 'RedHat': {
  98. 'bridge_pkgs': ['bridge-utils'],
  99. 'ovs_pkgs': ['openvswitch-switch'],
  100. 'hostname_file': '/etc/sysconfig/network',
  101. 'network_manager': False,
  102. 'interface': {},
  103. 'interface_params': interface_params,
  104. 'bridge': 'none',
  105. 'proxy': {
  106. 'host': 'none',
  107. },
  108. 'host': {},
  109. },
  110. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  111. {% set storage = salt['grains.filter_by']({
  112. 'Arch': {
  113. 'mount': {},
  114. 'swap': {},
  115. 'lvm': {},
  116. 'multipath': {
  117. 'enabled': False,
  118. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  119. 'service': ''
  120. },
  121. },
  122. 'Debian': {
  123. 'mount': {},
  124. 'swap': {},
  125. 'lvm': {},
  126. 'multipath': {
  127. 'enabled': False,
  128. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  129. 'service': 'multipath-tools'
  130. },
  131. 'lvm_pkgs': ['lvm2'],
  132. },
  133. 'RedHat': {
  134. 'mount': {},
  135. 'swap': {},
  136. 'lvm': {},
  137. 'multipath': {
  138. 'enabled': False,
  139. 'pkgs': [],
  140. 'service': 'multipath'
  141. },
  142. },
  143. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}