Saltstack Official Linux Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

157 lines
3.9KB

  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. 'ovs_ports',
  57. 'ovs_bridge',
  58. 'mode',
  59. 'port_type',
  60. 'peer',
  61. 'lacp-rate',
  62. 'dns-search',
  63. 'up_cmds',
  64. 'pre_up_cmds',
  65. 'post_up_cmds',
  66. 'down_cmds',
  67. 'pre_down_cmds',
  68. 'post_down_cmds',
  69. 'maxwait',
  70. 'stp',
  71. 'gro',
  72. 'lacp_rate',
  73. 'ad_select',
  74. 'downdelay',
  75. 'updelay',
  76. 'hashing-algorithm',
  77. ] %}
  78. {% set network = salt['grains.filter_by']({
  79. 'Arch': {
  80. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  81. 'bridge_pkgs': ['bridge-utils'],
  82. 'ovs_pkgs': ['openvswitch-switch'],
  83. 'hostname_file': '/etc/hostname',
  84. 'network_manager': False,
  85. 'interface': {},
  86. 'interface_params': interface_params,
  87. 'bridge': 'none',
  88. 'proxy': {
  89. 'host': 'none',
  90. },
  91. 'host': {},
  92. },
  93. 'Debian': {
  94. 'hostname_file': '/etc/hostname',
  95. 'bridge_pkgs': ['bridge-utils'],
  96. 'ovs_pkgs': ['openvswitch-switch', 'bridge-utils'],
  97. 'network_manager': False,
  98. 'interface': {},
  99. 'interface_params': interface_params,
  100. 'bridge': 'none',
  101. 'proxy': {
  102. 'host': 'none',
  103. },
  104. 'host': {},
  105. },
  106. 'RedHat': {
  107. 'bridge_pkgs': ['bridge-utils'],
  108. 'ovs_pkgs': ['openvswitch-switch', 'bridge-utils'],
  109. 'hostname_file': '/etc/sysconfig/network',
  110. 'network_manager': False,
  111. 'interface': {},
  112. 'interface_params': interface_params,
  113. 'bridge': 'none',
  114. 'proxy': {
  115. 'host': 'none',
  116. },
  117. 'host': {},
  118. },
  119. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  120. {% set storage = salt['grains.filter_by']({
  121. 'Arch': {
  122. 'mount': {},
  123. 'swap': {},
  124. 'lvm': {},
  125. 'multipath': {
  126. 'enabled': False,
  127. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  128. 'service': ''
  129. },
  130. },
  131. 'Debian': {
  132. 'mount': {},
  133. 'swap': {},
  134. 'lvm': {},
  135. 'multipath': {
  136. 'enabled': False,
  137. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  138. 'service': 'multipath-tools'
  139. },
  140. 'lvm_pkgs': ['lvm2'],
  141. },
  142. 'RedHat': {
  143. 'mount': {},
  144. 'swap': {},
  145. 'lvm': {},
  146. 'multipath': {
  147. 'enabled': False,
  148. 'pkgs': [],
  149. 'service': 'multipath'
  150. },
  151. },
  152. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}