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.

153 lines
3.8KB

  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'],
  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. 'mode',
  57. 'lacp-rate',
  58. 'dns-search',
  59. 'up_cmds',
  60. 'pre_up_cmds',
  61. 'post_up_cmds',
  62. 'down_cmds',
  63. 'pre_down_cmds',
  64. 'post_down_cmds',
  65. 'maxwait',
  66. 'stp',
  67. 'gro',
  68. 'lacp_rate',
  69. 'ad_select',
  70. 'downdelay',
  71. 'updelay',
  72. 'hashing-algorithm',
  73. ] %}
  74. {% set network = salt['grains.filter_by']({
  75. 'Arch': {
  76. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  77. 'bridge_pkgs': ['bridge-utils'],
  78. 'ovs_pkgs': ['openvswitch-switch'],
  79. 'hostname_file': '/etc/hostname',
  80. 'network_manager': False,
  81. 'interface': {},
  82. 'interface_params': interface_params,
  83. 'bridge': 'none',
  84. 'proxy': {
  85. 'host': 'none',
  86. },
  87. 'host': {},
  88. },
  89. 'Debian': {
  90. 'hostname_file': '/etc/hostname',
  91. 'bridge_pkgs': ['bridge-utils'],
  92. 'ovs_pkgs': ['openvswitch-switch'],
  93. 'network_manager': False,
  94. 'interface': {},
  95. 'interface_params': interface_params,
  96. 'bridge': 'none',
  97. 'proxy': {
  98. 'host': 'none',
  99. },
  100. 'host': {},
  101. },
  102. 'RedHat': {
  103. 'bridge_pkgs': ['bridge-utils'],
  104. 'ovs_pkgs': ['openvswitch-switch'],
  105. 'hostname_file': '/etc/sysconfig/network',
  106. 'network_manager': False,
  107. 'interface': {},
  108. 'interface_params': interface_params,
  109. 'bridge': 'none',
  110. 'proxy': {
  111. 'host': 'none',
  112. },
  113. 'host': {},
  114. },
  115. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  116. {% set storage = salt['grains.filter_by']({
  117. 'Arch': {
  118. 'mount': {},
  119. 'swap': {},
  120. 'lvm': {},
  121. 'multipath': {
  122. 'enabled': False,
  123. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  124. 'service': ''
  125. },
  126. },
  127. 'Debian': {
  128. 'mount': {},
  129. 'swap': {},
  130. 'lvm': {},
  131. 'multipath': {
  132. 'enabled': False,
  133. 'pkgs': ['multipath-tools', 'multipath-tools-boot'],
  134. 'service': 'multipath-tools'
  135. },
  136. 'lvm_pkgs': ['lvm2'],
  137. },
  138. 'RedHat': {
  139. 'mount': {},
  140. 'swap': {},
  141. 'lvm': {},
  142. 'multipath': {
  143. 'enabled': False,
  144. 'pkgs': [],
  145. 'service': 'multipath'
  146. },
  147. },
  148. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}