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.

128 lines
3.1KB

  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. 'motd': {},
  10. 'repo': {},
  11. 'package': {},
  12. 'selinux': 'permissive',
  13. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  14. },
  15. 'Debian': {
  16. 'pkgs': ['python-apt','vim'],
  17. 'utc': true,
  18. 'user': {},
  19. 'group': {},
  20. 'job': {},
  21. 'limit': {},
  22. 'motd': {},
  23. 'repo': {},
  24. 'package': {},
  25. 'selinux': 'permissive',
  26. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  27. },
  28. 'RedHat': {
  29. 'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'],
  30. 'utc': true,
  31. 'user': {},
  32. 'group': {},
  33. 'job': {},
  34. 'limit': {},
  35. 'motd': {},
  36. 'repo': {},
  37. 'package': {},
  38. 'selinux': 'permissive',
  39. 'ca_certs_dir': '/usr/local/share/ca-certificates',
  40. },
  41. }, grain='os_family', merge=salt['pillar.get']('linux:system')) %}
  42. {# 'network_name', #}
  43. {% set interface_params = [
  44. 'gateway',
  45. 'mtu',
  46. 'network',
  47. 'broadcast',
  48. 'master',
  49. 'miimon',
  50. 'mode',
  51. 'lacp-rate',
  52. 'dns-search',
  53. 'up_cmds',
  54. 'pre_up_cmds',
  55. 'post_up_cmds',
  56. 'down_cmds',
  57. 'pre_down_cmds',
  58. 'post_down_cmds',
  59. ] %}
  60. {% set network = salt['grains.filter_by']({
  61. 'Arch': {
  62. 'pkgs': ['wpa_supplicant', 'dhclient', 'wireless_tools'],
  63. 'bridge_pkgs': ['bridge-utils'],
  64. 'ovs_pkgs': ['openvswitch-switch'],
  65. 'hostname_file': '/etc/hostname',
  66. 'network_manager': False,
  67. 'interface': {},
  68. 'interface_params': interface_params,
  69. 'bridge': 'none',
  70. 'proxy': {
  71. 'host': 'none',
  72. },
  73. 'host': {},
  74. },
  75. 'Debian': {
  76. 'hostname_file': '/etc/hostname',
  77. 'bridge_pkgs': ['bridge-utils'],
  78. 'ovs_pkgs': ['openvswitch-switch'],
  79. 'network_manager': False,
  80. 'interface': {},
  81. 'interface_params': interface_params,
  82. 'bridge': 'none',
  83. 'proxy': {
  84. 'host': 'none',
  85. },
  86. 'host': {},
  87. },
  88. 'RedHat': {
  89. 'bridge_pkgs': ['bridge-utils'],
  90. 'ovs_pkgs': ['openvswitch-switch'],
  91. 'hostname_file': '/etc/sysconfig/network',
  92. 'network_manager': False,
  93. 'interface': {},
  94. 'interface_params': interface_params,
  95. 'bridge': 'none',
  96. 'proxy': {
  97. 'host': 'none',
  98. },
  99. 'host': {},
  100. },
  101. }, grain='os_family', merge=salt['pillar.get']('linux:network')) %}
  102. {% set storage = salt['grains.filter_by']({
  103. 'Arch': {
  104. 'mount': {},
  105. 'swap': {},
  106. 'lvm': {},
  107. 'multipath': False,
  108. },
  109. 'Debian': {
  110. 'mount': {},
  111. 'swap': {},
  112. 'lvm': {},
  113. 'multipath': False,
  114. 'multipath_pkgs': ['multipath-tools'],
  115. 'lvm_pkgs': ['lvm2'],
  116. },
  117. 'RedHat': {
  118. 'mount': {},
  119. 'swap': {},
  120. 'lvm': {},
  121. 'multipath': False,
  122. },
  123. }, grain='os_family', merge=salt['pillar.get']('linux:storage')) %}