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.

169 lines
4.2KB

  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. 'network_manager': False,
  107. 'interface': {},
  108. 'interface_params': interface_params,
  109. 'bridge': 'none',
  110. 'proxy': {
  111. 'host': 'none',
  112. },
  113. 'host': {},
  114. },
  115. 'RedHat': {
  116. 'bridge_pkgs': ['bridge-utils'],
  117. 'ovs_pkgs': ['openvswitch-switch', 'bridge-utils'],
  118. 'hostname_file': '/etc/sysconfig/network',
  119. 'network_manager': False,
  120. 'interface': {},
  121. 'interface_params': interface_params,
  122. 'bridge': 'none',
  123. 'proxy': {
  124. 'host': 'none',
  125. },
  126. 'host': {},
  127. },
  128. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  129. {% set storage = salt['grains.filter_by']({
  130. 'Arch': {
  131. 'mount': {},
  132. 'swap': {},
  133. 'lvm': {},
  134. 'loopback': {},
  135. 'multipath': {
  136. 'enabled': False,
  137. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  138. 'service': ''
  139. },
  140. },
  141. 'Debian': {
  142. 'mount': {},
  143. 'swap': {},
  144. 'lvm': {},
  145. 'loopback': {},
  146. 'multipath': {
  147. 'enabled': False,
  148. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  149. 'service': 'multipath-tools'
  150. },
  151. 'lvm_pkgs': ['lvm2'],
  152. },
  153. 'RedHat': {
  154. 'mount': {},
  155. 'swap': {},
  156. 'lvm': {},
  157. 'loopback': {},
  158. 'multipath': {
  159. 'enabled': False,
  160. 'pkgs': [],
  161. 'service': 'multipath'
  162. },
  163. },
  164. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}