Saltstack Official Linux Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

118 lines
2.9KB

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