CnetOS 下搭建 ---Saltstack

模块

1.salt-ssh

yum install salt-ssh

vim /etc/salt/roster

centos6.5-06:

  host:192.168.17.145

  user:root

  passwd:111111

      port: 22

timeout: 30

问题: salt-ssh"*" test.ping 

       The host key needs to be accepted, toauto accept run salt-ssh with the -i flag:

        Theauthenticity of host '192.168.17.145 (192.168.17.145)' can't be established.

        RSA keyfingerprint is 4c:89:e6:46:95:cf:a9:52:df:ff:bf:9d:25:93:da:f2.

        Are you sure you want to continue connecting(yes/no)?

解决方法:原因是无法输入yes命令无法继续执行

[root@bogon salt]# touch/root/.ssh/config

[root@bogon salt]# vim/root/.ssh/config

host 192.168.17.146 -------minion端ip

StrictHostKeyChecking no

 [root@bogon salt]# salt-ssh "*"cmd.run "df -h"

centos6.5-06:

   Filesystem                    Size  Used Avail Use% Mounted on

   /dev/mapper/VolGroup-lv_root  18G  3.5G   13G 22% /

   tmpfs                        495M   96K  495M  1% /dev/shm

           /dev/sda1                     485M   35M 426M   8% /boot
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值