我想安装一个包含以下SaltStack代码的本地包:
test_package:
pkg.installed:
- source: /suresh/depot/files/tss-7.0.1.x86_64.rpm
- target: /product/install
- cwd: /suresh/product
- user: root
- group: root
当我运行上面的代码时,我收到以下错误:.rpm package is present /suresh/depot/files folder.
ID: test_package
Function: pkg.installed
Name: tss-7.0.1.x86_64.rpm
Result: False
Comment: Error occurred installing package(s). Additional info follows:
errors:
- Running scope as unit run-9356.scope.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.heanet.ie
* extras: ftp.heanet.ie
* updates: ftp.heanet.ie
No package tss-7.0.1.x86_64.rpm available.
Error: Nothing to do
Started: 12:12:19.575701
Duration: 5584.961 ms
答案 0 :(得分:0)
您的源位置应该在salt文件夹中。
实施例:
如果您在/usr/local/etc/salt/states
上保存了salt文件
如果您的文件在此文件夹中,请说出/usr/local/etc/salt/states/pkgs/files/tss-7.0.1.x86_64.rpm
然后
test_package:
pkg.installed:
- source: salt://pkgs/tss-7.0.1.x86_64.rpm
- user: root
- group: root