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.

179 lines
4.5KB

  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. 'multipath': {
  146. 'enabled': False,
  147. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  148. 'service': ''
  149. },
  150. },
  151. 'Debian': {
  152. 'mount': {},
  153. 'swap': {},
  154. 'lvm': {},
  155. 'loopback': {},
  156. 'multipath': {
  157. 'enabled': False,
  158. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  159. 'service': 'multipath-tools'
  160. },
  161. 'lvm_pkgs': ['lvm2'],
  162. },
  163. 'RedHat': {
  164. 'mount': {},
  165. 'swap': {},
  166. 'lvm': {},
  167. 'loopback': {},
  168. 'multipath': {
  169. 'enabled': False,
  170. 'pkgs': [],
  171. 'service': 'multipath'
  172. },
  173. },
  174. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}