通过命令行将客户端注册到代理

Instead of the Web UI, you can use the command line to register a client to a proxy. This procedure requires that you have installed the Salt package on the client before registration. For SLE 12 based clients, you also must have activated the Advanced Systems Management module.

过程:使用命令行将客户端注册到代理
  1. 选择位于以下位置的客户端配置文件:

    /etc/salt/minion

    或:

    /etc/salt/minion.d/NAME.conf

    该文件有时也称为受控端文件。

  2. 将代理 FQDN 作为 master 添加到客户端配置文件:

    master: PROXY123.EXAMPLE.COM
  3. Restart the salt-minion service:

    systemctl restart salt-minion
  4. On the server, accept the new client key; replace <client> with the name of your client:

    salt-key -a '<客户端>'