如何将盐状态写入 pip install 要求文件?

Dav*_*ton 3 python yaml salt-stack

找不到这个写的。我想:

pip.install:
  - requirements: /path/to/requirements.txt
Run Code Online (Sandbox Code Playgroud)

但我收到错误

ID pip.install in SLS python.python-pip is not a dictionary
Run Code Online (Sandbox Code Playgroud)

许多其他方法包括 virtualenvs,但我不想使用 virtualenv 来执行此操作,因为它用于虚拟机,所以没有意义。

the*_*olm 5

pip.install编辑器

pip.installed:
  - requirements: /path/to/requirements.txt
Run Code Online (Sandbox Code Playgroud)