Saltstack Official Salt Formula
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

150 lines
4.8KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. {%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}
  5. {%- set osrelease = salt['grains.get']('osrelease', '') %}
  6. {%- set salt_release = salt['pillar.get']('salt:release', 'latest') %}
  7. {%- if salt_release.split('.')|length >= 3 %}
  8. {%- set salt_release = 'archive/' ~ salt_release %}
  9. {%- endif %}
  10. {%- set osfamily_lower = salt['grains.get']('os_family')|lower %}
  11. {%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
  12. {%- set oscodename = salt['grains.get']('oscodename') %}
  13. {%- set opensuse_repo_suffix = 'Leap_' ~ osrelease if salt['grains.get']('osfinger', '') == 'Leap-15' else 'Tumbleweed' %}
  14. {%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}
  15. #from template-formula
  16. {%- if grains.os_family == 'MacOS' %}
  17. {%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
  18. {%- set rootgroup = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
  19. {%- elif grains.os_family == 'Windows' %}
  20. {%- set rootuser = salt['cmd.run']("whoami").split("\\")[1] %}
  21. {%- endif %}
  22. Debian:
  23. pkgrepo: 'deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
  24. pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/salt-archive-keyring.gpg'
  25. pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
  26. libgit2: libgit2-22
  27. pyinotify: python-pyinotify
  28. gitfs:
  29. pygit2:
  30. install_from_source: true
  31. version: 0.22.1
  32. git:
  33. require_state: false
  34. install_from_package: git
  35. libgit2:
  36. install_from_source: false
  37. RedHat:
  38. pkgrepo_name: saltstack
  39. pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
  40. pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}'
  41. key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
  42. pygit2: python-pygit2
  43. python_git: GitPython
  44. gitfs:
  45. gitpython:
  46. install_from_source: false
  47. pygit2:
  48. install_from_source: false
  49. git:
  50. require_state: false
  51. install_from_package: git
  52. master:
  53. gitfs_provider: pygit2
  54. Suse:
  55. pkgrepo_humanname: 'Salt releases for SLE-based SUSE products (openSUSE_{{ opensuse_repo_suffix }})'
  56. pkgrepo: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack/openSUSE_{{ opensuse_repo_suffix }}/'
  57. key_url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack/openSUSE_{{ opensuse_repo_suffix }}/repodata/repomd.xml.key'
  58. pygit2: python-pygit2
  59. pyinotify: python-pyinotify
  60. gitfs:
  61. pygit2:
  62. install_from_source: false
  63. git:
  64. require_state: false
  65. install_from_package: git
  66. master:
  67. gitfs_provider: pygit2
  68. Gentoo:
  69. salt_master: app-admin/salt
  70. salt_minion: app-admin/salt
  71. salt_syndic: app-admin/salt
  72. salt_api: app-admin/salt
  73. salt_cloud: app-admin/salt
  74. pyinotify: dev-python/pyinotify
  75. Arch:
  76. salt_master: salt
  77. salt_minion: salt
  78. salt_syndic: salt
  79. salt_cloud: salt
  80. salt_api: salt
  81. salt_ssh: salt
  82. python_git: python2-gitpython
  83. pygit2: python2-pygit2
  84. libgit2: libgit2
  85. pyinotify: python2-pyinotify
  86. Alpine:
  87. salt-master: salt-master
  88. salt_minion: salt-minion
  89. salt_syndic: salt-syndic
  90. salt_cloud: salt-cloud
  91. salt_api: salt-api
  92. salt_ssh: salt-ssh
  93. pygit2: py2-pygit2
  94. libgit2: libgit2
  95. FreeBSD:
  96. rootgroup: wheel
  97. salt_master: {{ py_ver_repr or 'py27' }}-salt
  98. salt_minion: {{ py_ver_repr or 'py27' }}-salt
  99. salt_syndic: {{ py_ver_repr or 'py27' }}-salt
  100. salt_cloud: {{ py_ver_repr or 'py27' }}-salt
  101. salt_api: {{ py_ver_repr or 'py27' }}-salt
  102. salt_ssh: {{ py_ver_repr or 'py27' }}-salt
  103. python_git: {{ py_ver_repr or 'py27' }}-GitPython
  104. pygit2: {{ py_ver_repr or 'py27' }}-pygit2
  105. config_path: /usr/local/etc/salt
  106. minion_service: salt_minion
  107. master_service: salt_master
  108. api_service: salt_api
  109. syndic_service: salt_syndic
  110. OpenBSD:
  111. salt_master: salt
  112. salt_minion: salt
  113. salt_syndic: salt
  114. salt_cloud: salt
  115. salt_api: salt
  116. salt_ssh: salt
  117. config_path: /etc/salt
  118. minion_service: salt_minion
  119. master_service: salt_master
  120. python_git: py-GitPython
  121. Windows:
  122. salt_minion: salt-minion{{ '-' ~ py_ver_repr if py_ver_repr else '' }}
  123. config_path: 'C:\salt\conf'
  124. minion_service: salt-minion
  125. rootuser: {{ rootuser | d('') }}
  126. MacOS:
  127. salt_master: saltstack
  128. salt_minion: salt
  129. salt_minion_pkg_source: ''
  130. salt_minion_pkg_hash: ''
  131. config_path: /private/etc/salt
  132. minion_service: com.saltstack.salt.minion
  133. ## from template-formula
  134. rootuser: {{ rootuser | d('') }}
  135. rootgroup: {{ rootgroup | d('') }}