当初始化安装 minion 启动服务启动后socket
minion 默认按照以下顺序,试图在找到一个不是localhost的值做为ID:函数
若是以上都可以产生一个ID, 而且不是localhost,then a sorted list of IP addresses on the minion (excluding any within 127.0.0.0/8) is inspected. The first publicly-routable IP address is used, if there is one.Otherwise, the first privately-routable IP address is used.若是一切都失败了,那么则使用localhost做为备用,最终获取的ID将记录在/etc/salt/minion_id文件中,该文件能够手动更改,重启服务后不会被从新覆盖。get
注意:若是minion端主配置文件 /etc/salt/minion 中启用了 id: xxxx , 那么这个ID值将覆盖 /etc/salt/minion_id 中记录的ID数值.it
<pre> /etc/salt/pki/master/master.pub /etc/salt/pki/master/master.pem </pre>io
<pre> /etc/salt/pki/master/minions/ </pre>table
<pre> /etc/salt/pki/minion/minion.pub /etc/salt/pki/minion/minion.pem </pre>ast
<pre> /etc/salt/pki/minion/minion_master.pub </pre>扩展
<pre>/etc/salt/minion_id</pre>sed