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.

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