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.

160 lines
4.0KB

  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. 'loopback': {},
  126. 'multipath': {
  127. 'enabled': False,
  128. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  129. 'service': ''
  130. },
  131. },
  132. 'Debian': {
  133. 'mount': {},
  134. 'swap': {},
  135. 'lvm': {},
  136. 'loopback': {},
  137. 'multipath': {
  138. 'enabled': False,
  139. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  140. 'service': 'multipath-tools'
  141. },
  142. 'lvm_pkgs': ['lvm2'],
  143. },
  144. 'RedHat': {
  145. 'mount': {},
  146. 'swap': {},
  147. 'lvm': {},
  148. 'loopback': {},
  149. 'multipath': {
  150. 'enabled': False,
  151. 'pkgs': [],
  152. 'service': 'multipath'
  153. },
  154. },
  155. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}