Saltstack Official Salt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

151 lines
4.9KB

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