我有一系列在Ubuntu上工作得很好的公式,但是我发现在运行CentOS版本6.6 (Final)的我的走狗上,它们不能正常工作。“奴才”正在运行盐版: salt 2014.7.0 (氦)
例如,git核心包无法工作:
git-core:
pkg.installed当我运行highstate时,会得到以下错误:
[user] out: ----------
[user] out: ID: git-core
[user] out: Function: pkg.installed
[user] out: Result: False
[user] out: Comment: Package 'git-core' not found (possible matches: git, wt-git)
[user] out: Changes:
[user] out: ----------当我试图在服务器上手动安装需求时,它们似乎已经安装了:
root@host [225 01:41:35 /home/project]# yum install git-core
Loaded plugins: changelog, downloadonly, fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: mirror.steadfast.net
Package wt-git-1.7.1-1.x86_64 already installed and latest version
Nothing to do为什么在安装git核心时,SaltStack会“找不到”它?
顺便说一句,包之间有一整套错误,而不仅仅是git,包括:
[user] out: ----------
[user] out: ID: ssh
[user] out: Function: service.running
[user] out: Result: False
[user] out: Comment: The named service ssh is not available
[user] out: Changes:
[user] out: ----------
[user] out: ID: iptables-persistent
[user] out: Function: pkg.installed
[user] out: Result: False
[user] out: Comment: The following package(s) were not found, and no possible matches were found in the package db: iptables-persistent
[user] out: Changes:
[user] out: ----------
[user] out: ID: iptables-persistent
[user] out: Function: service.running
[user] out: Result: False
[user] out: Comment: The named service iptables-persistent is not available
[user] out: Changes:
[user] out: ----------
[user] out: ID: openjdk-6-jdk
[user] out: Function: pkg.installed
[user] out: Result: False
[user] out: Comment: The following package(s) were not found, and no possible matches were found in the package db: openjdk-6-jdk
[user] out: Changes:
[user] out: ----------
[user] out: ID: tomcat6
[user] out: Function: pkg.installed
[user] out: Result: False
[user] out: Comment: The following packages failed to install/update: tomcat6.
[user] out: Changes:
[user] out: ----------发布于 2015-01-25 23:02:19
我相信你已经找到了这个,但为了下一个人,它是sshd在我的CentOS盒。试一试如下:
{% if grains['os_family']=="RedHat" %}
sshd:
service.running
{% elif grains['os_family']=="Debian" %}
ssh:
service.running
{% endif %}发布于 2015-01-14 18:47:19
看起来,这是因为包的名称可能略有不同,这取决于os家族。
为了解决这个问题,我将"RedHat“系统的git包名称更新为'wt-git':
{% if grains['os_family']=="RedHat" %}
wt-git:
pkg.installed
{% elif grains['os_family']=="Debian" %}
git-core:
pkg.installed
{% endif %} 对于java:
{% if grains['os_family']=="RedHat" %}
java-1.6.0-openjdk:
pkg.installed
{% elif grains['os_family']=="Debian" %}
openjdk-6-jdk:
pkg.installed
{% endif %} 仍然不确定不被识别的SSH service.running的解决方法是什么。
https://stackoverflow.com/questions/27938174
复制相似问题