Saltstack Official Salt Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

154 lines
5.0KB

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