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

131 行
3.3KB

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