saltstack 自动化运维神器(四)salt-ssh
# salt-ssh compute2 state.sls epel.salt_installcompute2:
----------
cmd_|-cache_yum_|-yum makecache_|-run:
----------
__run_num__:
1
changes:
----------
pid:
10311
retcode:
0
stderr:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
stdout:
Loaded plugins: product-id, security, subscription-manager
Metadata Cache Created
comment:
Command "yum makecache" run
name:
yum makecache
result:
True
cmd_|-clear_yum_|-yum clean all_|-run:
----------
__run_num__:
0
changes:
----------
pid:
10310
retcode:
0
stderr:
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
stdout:
Loaded plugins: product-id, security, subscription-manager
Cleaning repos: base rhel-HighAvailability rhel-LoadBalancer
: rhel-ResilientStorage rhel-ScalableFileSystem rhel-Server
: saltstack
Cleaning up Everything
comment:
Command "yum clean all" run
name:
yum clean all
result:
True
pkg_|-salt_install_|-salt-minion_|-installed:
----------
__run_num__:
2
changes:
----------
openpgm:
----------
new:
5.1.118-3.el6
old:
python-babel:
----------
new:
0.9.4-5.1.el6
old:
python-jinja2:
----------
new:
2.2.1-1.el6.rf
old:
python-libcloud:
----------
new:
0.14.1-1.el6
old:
python-yaml:
----------
new:
3.09-3.el6.rf
old:
python-zmq:
----------
new:
14.3.1-1.el6
old:
salt:
----------
new:
2014.1.10-4.el6
old:
salt-minion:
----------
new:
2014.1.10-4.el6
old:
sshpass:
----------
new:
1.05-1.el6.rf
old:
zeromq3:
----------
new:
3.2.4-1.el6
old:
comment:
The following packages were installed/updated: salt-minion.
name:
salt-minion
result:
True
# salt-ssh '*' -r 'sed -i "s/#master: salt/master: 10.10.10.4/" /etc/salt/minion '//修改修改minion的master的IP地址
# salt-ssh '*' -r 'service salt-minion restart'
# salt-key -L
Accepted Keys:
Unaccepted Keys:
compute1
compute2
manager01
Rejected Keys:
# salt-key –A //接受所有的key
The following keys are going to be accepted:
Unaccepted Keys:
compute1
compute2
manager01
Proceed? y
Key for minion compute1 accepted.
Key for minion compute2 accepted.
Key for minion manager01 accepted.
# salt-key -L
Accepted Keys:
compute1
compute2
manager01
Unaccepted Keys:
Rejected Keys:
页:
[1]