Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 satır
4.5KB

  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.saltstack.com') %}
  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']("id -un") %}
  21. {%- endif %}
  22. Debian:
  23. pkgrepo: 'deb {{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
  24. key_url: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
  25. libgit2: libgit2-22
  26. pyinotify: python-pyinotify
  27. gitfs:
  28. pygit2:
  29. install_from_source: true
  30. version: 0.22.1
  31. git:
  32. require_state: false
  33. install_from_package: git
  34. libgit2:
  35. install_from_source: false
  36. RedHat:
  37. pkgrepo_name: saltstack
  38. pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
  39. pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}'
  40. key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
  41. pygit2: python-pygit2
  42. python_git: GitPython
  43. gitfs:
  44. gitpython:
  45. install_from_source: false
  46. pygit2:
  47. install_from_source: false
  48. git:
  49. require_state: false
  50. install_from_package: git
  51. master:
  52. gitfs_provider: pygit2
  53. Suse:
  54. pkgrepo_humanname: 'Salt releases for SLE-based SUSE products (openSUSE_{{ opensuse_repo_suffix }})'
  55. pkgrepo: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack/openSUSE_{{ opensuse_repo_suffix }}/'
  56. key_url: 'https://download.opensuse.org/repositories/systemsmanagement:/saltstack/openSUSE_{{ opensuse_repo_suffix }}/repodata/repomd.xml.key'
  57. pygit2: python-pygit2
  58. pyinotify: python-pyinotify
  59. gitfs:
  60. pygit2:
  61. install_from_source: false
  62. git:
  63. require_state: false
  64. install_from_package: git
  65. master:
  66. gitfs_provider: pygit2
  67. Gentoo:
  68. salt_master: app-admin/salt
  69. salt_minion: app-admin/salt
  70. salt_syndic: app-admin/salt
  71. salt_api: app-admin/salt
  72. salt_cloud: app-admin/salt
  73. pyinotify: dev-python/pyinotify
  74. Arch:
  75. salt_master: salt
  76. salt_minion: salt
  77. salt_syndic: salt
  78. salt_cloud: salt
  79. salt_api: salt
  80. salt_ssh: salt
  81. python_git: python2-gitpython
  82. pygit2: python2-pygit2
  83. libgit2: libgit2
  84. pyinotify: python2-pyinotify
  85. Alpine:
  86. salt-master: salt-master
  87. salt_minion: salt-minion
  88. salt_syndic: salt-syndic
  89. salt_cloud: salt-cloud
  90. salt_api: salt-api
  91. salt_ssh: salt-ssh
  92. pygit2: py2-pygit2
  93. libgit2: libgit2
  94. FreeBSD:
  95. rootgroup: wheel
  96. salt_master: {{ py_ver_repr or 'py27' }}-salt
  97. salt_minion: {{ py_ver_repr or 'py27' }}-salt
  98. salt_syndic: {{ py_ver_repr or 'py27' }}-salt
  99. salt_cloud: {{ py_ver_repr or 'py27' }}-salt
  100. salt_api: {{ py_ver_repr or 'py27' }}-salt
  101. salt_ssh: {{ py_ver_repr or 'py27' }}-salt
  102. python_git: {{ py_ver_repr or 'py27' }}-GitPython
  103. pygit2: {{ py_ver_repr or 'py27' }}-pygit2
  104. config_path: /usr/local/etc/salt
  105. minion_service: salt_minion
  106. master_service: salt_master
  107. api_service: salt_api
  108. syndic_service: salt_syndic
  109. OpenBSD:
  110. salt_master: salt
  111. salt_minion: salt
  112. salt_syndic: salt
  113. salt_cloud: salt
  114. salt_api: salt
  115. salt_ssh: salt
  116. config_path: /etc/salt
  117. minion_service: salt_minion
  118. master_service: salt_master
  119. python_git: py-GitPython
  120. Windows:
  121. salt_minion: salt-minion{{ '-' ~ py_ver_repr if py_ver_repr else '' }}
  122. config_path: 'C:\salt\conf'
  123. minion_service: salt-minion
  124. rootuser: {{ rootuser | d('') }}
  125. MacOS:
  126. salt_minion: salt
  127. salt_minion_pkg_source: ''
  128. salt_minion_pkg_hash: ''
  129. config_path: /private/etc/salt
  130. minion_service: com.saltstack.salt.minion
  131. ## from template-formula
  132. rootuser: {{ rootuser | d('') }}
  133. rootgroup: {{ rootgroup | d('') }}