码迷,mamicode.com
首页 > 其他好文 > 详细

salt-minion安装脚本

时间:2016-08-20 08:58:46      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:

#!/bin/bash

cd /usr/local/src/
wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum install python-jinja2

yum -y install salt-minion --enablerepo=epel-testing

IP=`ifconfig eth1 | grep -i bcast | awk ‘{print $2}‘| awk  -F : ‘{print $2}‘`
HOSTNAME=yqk_app
ID=$IP
MASTER=123.56.193.121

echo "master: $MASTER" >>/etc/salt/minion
echo "id: $HOSTNAME_$ID" >> /etc/salt/minion

service salt-minion restart
chkconfig salt-minion on
exit 0

  

salt-minion安装脚本

标签:

原文地址:http://www.cnblogs.com/xmzncc/p/5789581.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!