如何使用saltstack添加具有https url的包回购



我只是SaltStack的初学者。我可以看到有一个pkgrepo模块,可以用来设置包回购,以便从中安装包。

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkgrepo.html

我正在尝试下面的代码,但它抛出了错误,在salt网站上,我们不清楚如何使用url。

base:       
pkgrepo.managed:   
- name: https://xxxxx/artifactory/api/pypi/CLOUD-pypi-virtual/simple   
python-pip:   
pkg.installed

错误:

----------
ID: base
Function: pkgrepo.managed
Name: https://xxxx/artifactory/api/pypi/CLOUD-pypi-virtual/simple
Result: False
Comment: Failed to configure repo 'https://xxxx/artifactory/api/pypi/CLOUD-pypi-virtual/simple': The
repo does not exist and needs to be created, but either a baseurl or a
mirrorlist needs to be given
Started: 12:15:00.874579
Duration: 917.356 ms
Changes:
----------

此错误指示您需要为要创建的回购提供baseurlmirrorlist

至少您需要一个name,以及baseurlmirrorlist中的一个。

例如,考虑到您有一个baseurl:

install-python-pip:
pkgrepo.managed:
- name: python-pip
- humanname: PyPI package index       # optional human friendly name
- baseurl: https://xxxxx/artifactory/api/pypi/CLOUD-pypi-virtual/simple
pkg.installed:
- name: python-pip

最新更新