mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Add documentation on how the minion id is derived
This commit is contained in:
parent
f0240de257
commit
ce9b2728a0
@ -91,7 +91,7 @@ This directory is prepended to the following options: :conf_minion:`pki_dir`,
|
||||
``pki_dir``
|
||||
-----------
|
||||
|
||||
Default: :file:`/etc/salt/pki`
|
||||
Default: ``/etc/salt/pki``
|
||||
|
||||
The directory used to store the minion's public and private keys.
|
||||
|
||||
@ -104,8 +104,12 @@ The directory used to store the minion's public and private keys.
|
||||
``id``
|
||||
------
|
||||
|
||||
Default: the system's hostname (as returned by the Python function
|
||||
``socket.getfqdn()``)
|
||||
Default: the system's hostname
|
||||
|
||||
.. seealso:: :ref:`Salt Walkthrough <minion-id-generation>`
|
||||
|
||||
The :strong:`Setting up a Salt Minion` section contains detailed
|
||||
information on how the hostname is determined.
|
||||
|
||||
Explicitly declare the id for this minion to use. Since Salt uses detached ids
|
||||
it is possible to run multiple minions on the same machine but with different
|
||||
@ -135,7 +139,7 @@ FQDN (for instance, Solaris).
|
||||
``cachedir``
|
||||
------------
|
||||
|
||||
Default: :file:`/var/cache/salt`
|
||||
Default: ``/var/cache/salt``
|
||||
|
||||
The location for minion cache data.
|
||||
|
||||
|
@ -162,6 +162,31 @@ Now that the minion is started it will generate cryptographic keys and attempt
|
||||
to connect to the master. The next step is to venture back to the master server
|
||||
and accept the new minion's public key.
|
||||
|
||||
.. _minion-id-generation:
|
||||
|
||||
When the minion is started, it will generate an ``id`` value. This is the name
|
||||
by which the minion will attempt to authenticate to the master. The following
|
||||
steps are attempted, in order to try to find a value that is not ``localhost``:
|
||||
|
||||
1. ``/etc/hostname`` is checked (non-Windows only)
|
||||
2. The Python function ``socket.getfqdn()`` is run
|
||||
3. ``/etc/hosts`` is checked for hostnames that map to anything within
|
||||
:strong:`127.0.0.0/8`. (non-Windows only)
|
||||
4. ``%WINDIR%\system32\drivers\etc\hosts`` is checked (Windows only)
|
||||
|
||||
If none of the above are able to produce an id which is not ``localhost``, then
|
||||
a sorted list of IP addresses on the minion (excluding any within
|
||||
:strong:`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.
|
||||
|
||||
If all else fails, then ``localhost`` is used as a fallback.
|
||||
|
||||
.. note:: Overriding the ``id``
|
||||
|
||||
The minion id can be manually specified using the :conf_minion:`id`
|
||||
parameter in the minion config file.
|
||||
|
||||
|
||||
Using salt-key
|
||||
~~~~~~~~~~~~~~
|
||||
|
Loading…
Reference in New Issue
Block a user