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.

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