當初始化安裝 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