09-saltstack远程管理
# vim /etc/salt/master # 打开注释publisher_acl:
xiaoyi:
- test.ping
- network.*
# /etc/init.d/salt-master restart # 重启服务
Stopping salt-master daemon:
Starting salt-master daemon:
# useradd xiaoyi
# passwd xiaoyi
Changing password for user xiaoyi.
New password:
BAD PASSWORD: it is WAY too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
# chmod 755 /var/cache/salt /var/cache/salt/master /var/cache/salt/master/jobs /var/run/salt /var/run/salt/master /var/log/salt/maste
# /etc/init.d/salt-master restart # 重启服务
# su - xiaoyi
$ salt '*' test.ping
Failed to open log file, do you have permission to write to /var/log/salt/master?
salt-minion02:
True
salt-minion01:
True
salt-master:
True
$ salt '*' cmd.run 'w'
Failed to open log file, do you have permission to write to /var/log/salt/master?
Failed to authenticate! This is most likely because this user is not permitted to execute commands, but there is a small possibility that a disk error occurred (check disk/inode usage).
页:
[1]