What are the default master configuration settings?

32 views
Skip to first unread message

Dean Schulze

unread,
Oct 11, 2018, 1:46:37 PM10/11/18
to Salt-users
I'm just getting started with Salt Stack and I can't find anything about the default settings for the master configuration.

For example the /etc/salt/master file is installed with everything commented out so there is no file_roots setting.  But if I create a state file /srv/salt/apache.sls I can execute it:

  sudo salt 'XPS-15-9560' state.sls apache

and it succeeds.

Does Salt have use a default for file_roots that it uses when nothing is set in /etc/salt/master?  It seems to use the commented out values in /etc/salt/master.  What about other defaults when nothing is set in /etc/salt/master?


Daniel Wallace

unread,
Oct 11, 2018, 1:47:30 PM10/11/18
to Salt-users
Yes, the commented out stuff in the default /etc/salt/master are the defaults.

Defaults are also listed in the doc.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/c0fc14d5-b61b-49ec-ab78-94863fa6da63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raf Czlonka

unread,
Oct 11, 2018, 4:59:03 PM10/11/18
to salt-...@googlegroups.com
Hi Dean,

It's clearly stated in the file itself :^)

$ head -n 7 /etc/salt/master
##### Primary configuration settings #####
##########################################
# This configuration file is used to manage the behavior of the Salt Master.
# Values that are commented out but have an empty line after the comment are
# defaults that do not need to be set in the config. If there is no blank line
# after the comment then the value is presented as an example and is not the
# default.

Cheers,

Raf

Dean Schulze

unread,
Oct 11, 2018, 9:13:39 PM10/11/18
to Salt-users
Here is what was in my /etc/salt/master:

#file_roots:
#  base:
#    - /srv/salt
#

The line after the commented out file_roots is not empty.  It's a comment line.  Are those still the defaults if they are followed by a comment line?

I would also recommend putting this in the docs.  Being new to Salt I didn't know that I had to look in /etc/salt/master to find this out. 

George Pickering

unread,
Oct 12, 2018, 6:54:30 AM10/12/18
to Salt-users
I would suggest you try reading some of the documentation... Everything is clearly outlined there. Specifically,
The Salt system is amazingly simple and easy to configure, the two components of the Salt system each have a respective configuration file. The salt-master is configured via the master configuration file, and the salt-minion is configured via the minion configuration file. The configuration file for the salt-master is located at /etc/salt/master by default

and

The Salt Minion configuration is very simple. Typically, the only value that needs to be set is the master value so the minion knows where to locate its master.

By default, the salt-minion configuration will be in /etc/salt/minion


If you have any questions regarding the actual configuration values, the default configuration files are very well commented. 

Raf Czlonka

unread,
Oct 13, 2018, 12:49:14 AM10/13/18
to salt-...@googlegroups.com
On Fri, Oct 12, 2018 at 02:13:39AM BST, Dean Schulze wrote:
> Here is what was in my /etc/salt/master:
>
> #file_roots:
> # base:
> # - /srv/salt
> #
>
> The line after the commented out file_roots is not empty. It's a comment
> line. Are those still the defaults if they are followed by a comment line?

Yes, you're right - according to the comment at the very top of that
file, there should have been an (uncommented) empty line after:

# - /srv/salt

The same goes for other settings, i.e. 'pillar_roots':

#pillar_roots:
# base:
# - /srv/pillar
#

It's also true in reverse, i.e. there should be *no* blank line after:

#file_ignore_regex:
# - '/\.svn($|/)'
# - '/\.git($|/)'

I concur that the documentation is inaccurate and confusing.
I've reported it upstream[0] and linked to your comment[1].

[0] https://github.com/saltstack/salt/issues/50025
[1] https://groups.google.com/forum/#!topic/salt-users/wP5r2nStBtI

Cheers,

Raf
Reply all
Reply to author
Forward
0 new messages