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

118 lines
5.1KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. {%- set osrelease = salt['grains.get']('osrelease', '') %}
  5. {%- set salt_release = salt['pillar.get']('salt:release', 'latest') | string %}
  6. {%- if salt_release.split('.')|length >= 3 %}
  7. {%- set salt_release = 'archive/' ~ salt_release %}
  8. {%- endif %}
  9. {%- set os_lower = salt['grains.get']('os')|lower %}
  10. {%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
  11. {%- set oscodename = salt['grains.get']('oscodename') %}
  12. {%- set os_family_lower = salt['grains.get']('os_family')|lower %}
  13. {%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}
  14. # Different salt versions have different repo's, keyrings, pubkeys and hashes.
  15. # 'latest' cannot be coerced into an integer and it's result will be int(0).
  16. {%- if salt_release.split('.')[0] | int >= 3006 or salt_release.split('.')[0] | int == 0 %}
  17. {%- set default_repo = 'https://repo.saltproject.io/salt' %}
  18. {%- set default_repo_keyring_filename = 'SALT-PROJECT-GPG-PUBKEY-2023.gpg' %}
  19. {%- set default_repo_pubkey_filename = 'SALT-PROJECT-GPG-PUBKEY-2023.pub' %}
  20. {%- set default_repo_keyring_hash = 'sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472' %}
  21. {%- set default_pyver_or_apt = 'py3' %}
  22. {%- set default_pyver_or_yum = 'py3' %}
  23. {%- else %}
  24. {%- set default_repo = 'https://repo.saltproject.io' %}
  25. {%- set default_repo_keyring_filename = 'salt-archive-keyring.gpg' %}
  26. {%- set default_repo_pubkey_filename = 'SALTSTACK-GPG-KEY.pub' %}
  27. {%- set default_repo_keyring_hash = 'sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47' %}
  28. {%- set default_pyver_or_apt = 'apt' %}
  29. {%- set default_pyver_or_yum = 'yum' %}
  30. {%- endif %}
  31. {%- set salt_repo = salt['pillar.get']('salt:repo', default_repo) %}
  32. {%- set salt_repo_keyring_filename = salt['pillar.get']('salt:repo_keyring_filename', default_repo_keyring_filename) %}
  33. {%- set salt_repo_pubkey_filename = salt['pillar.get']('salt:repo_keyring_filename', default_repo_pubkey_filename) %}
  34. {%- set salt_repo_keyring_hash = salt['pillar.get']('salt:repo_keyring_hash', default_repo_keyring_hash) %}
  35. {%- if os_family_lower in ["amazon"] %}
  36. {%- set py_ver_repr = salt['pillar.get']('salt:py_ver', default_pyver_or_yum) %}
  37. {%- elif os_family_lower in ["ubuntu", "raspbian"] %}
  38. {%- set py_ver_repr = salt['pillar.get']('salt:py_ver', default_pyver_or_apt) %}
  39. {%- else %}
  40. {%- set py_ver_repr = 'py3' %}
  41. {%- endif %}
  42. Fedora:
  43. pygit2: python2-pygit2
  44. Amazon:
  45. pkgrepo_name: saltstack-amzn-repo
  46. pkgrepo_humanname: SaltStack repo for Amazon Linux 2
  47. pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}'
  48. key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}/{{ salt_repo_pubkey_filename }}'
  49. Ubuntu:
  50. pkgrepo: 'deb [signed-by=/usr/share/keyrings/{{ salt_repo_keyring_filename}} arch=amd64] {{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
  51. pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/{{ salt_repo_keyring_filename }}'
  52. pkgrepo_keyring_hash: '{{ salt_repo_keyring_hash }}'
  53. key_url: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/{{ salt_repo_pubkey_filename }}'
  54. pygit2: python-pygit2
  55. gitfs:
  56. pygit2:
  57. install_from_source: false
  58. git:
  59. require_state: false
  60. install_from_package: Null
  61. Raspbian:
  62. pkgrepo: 'deb [signed-by=/usr/share/keyrings/{{ salt_repo_keyring_filename }} arch=armhf] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
  63. pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/{{ salt_repo_keyring_filename }}'
  64. SmartOS:
  65. salt_master: salt
  66. salt_minion: salt
  67. salt_syndic: salt
  68. salt_cloud: salt
  69. salt_api: salt
  70. salt_ssh: salt
  71. minion_service: 'salt:minion'
  72. master_service: 'salt:master'
  73. api_service: 'salt:api'
  74. python_dulwich: {{ py_ver_repr or 'py27' }}{{ '-dulwich' }}
  75. gitfs:
  76. dulwich:
  77. install_from_source: false
  78. config_path: /opt/local/etc/salt
  79. master:
  80. gitfs_provider: dulwich
  81. MacOS:
  82. minion_service: com.saltstack.salt.minion
  83. master_service: com.saltstack.salt.master
  84. salt_master_macos_plist_hash: 8435331b2d48ca8f0759f216e5b15ec9171a4216b1441328c732c6906728b7c9
  85. salt_minion_macos_plist_hash: 26b33da12e0d8960ee96b488c8352002c22a377c19bf3df3f986a1e49eca8b20
  86. FreeBSD:
  87. salt_master: py39-salt
  88. salt_minion: py39-salt
  89. salt_syndic: py39-salt
  90. salt_cloud: py39-salt
  91. salt_api: py39-salt
  92. salt_ssh: py39-salt
  93. python_git: py39-gitpython
  94. pygit2: py39-pygit2
  95. python_dulwich: py39-dulwich
  96. # If `osfingermap.yaml` is introduced in the future, perhaps better to move to there,
  97. # since this is probably specific to `OpenBSD-6`
  98. OpenBSD:
  99. python_git: py3-GitPython
  100. python_dulwich: py3-dulwich
  101. Windows:
  102. parallel: false # not supported on windows/cygwin