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.

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