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.

134 lines
3.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. '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'],
  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. ] %}
  66. {% set network = salt['grains.filter_by']({
  67. 'Arch': {
  68. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  69. 'bridge_pkgs': ['bridge-utils'],
  70. 'ovs_pkgs': ['openvswitch-switch'],
  71. 'hostname_file': '/etc/hostname',
  72. 'network_manager': False,
  73. 'interface': {},
  74. 'interface_params': interface_params,
  75. 'bridge': 'none',
  76. 'proxy': {
  77. 'host': 'none',
  78. },
  79. 'host': {},
  80. },
  81. 'Debian': {
  82. 'hostname_file': '/etc/hostname',
  83. 'bridge_pkgs': ['bridge-utils'],
  84. 'ovs_pkgs': ['openvswitch-switch'],
  85. 'network_manager': False,
  86. 'interface': {},
  87. 'interface_params': interface_params,
  88. 'bridge': 'none',
  89. 'proxy': {
  90. 'host': 'none',
  91. },
  92. 'host': {},
  93. },
  94. 'RedHat': {
  95. 'bridge_pkgs': ['bridge-utils'],
  96. 'ovs_pkgs': ['openvswitch-switch'],
  97. 'hostname_file': '/etc/sysconfig/network',
  98. 'network_manager': False,
  99. 'interface': {},
  100. 'interface_params': interface_params,
  101. 'bridge': 'none',
  102. 'proxy': {
  103. 'host': 'none',
  104. },
  105. 'host': {},
  106. },
  107. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  108. {% set storage = salt['grains.filter_by']({
  109. 'Arch': {
  110. 'mount': {},
  111. 'swap': {},
  112. 'lvm': {},
  113. 'multipath': False,
  114. },
  115. 'Debian': {
  116. 'mount': {},
  117. 'swap': {},
  118. 'lvm': {},
  119. 'multipath': False,
  120. 'multipath_pkgs': ['multipath-tools'],
  121. 'lvm_pkgs': ['lvm2'],
  122. },
  123. 'RedHat': {
  124. 'mount': {},
  125. 'swap': {},
  126. 'lvm': {},
  127. 'multipath': False,
  128. },
  129. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}