mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 09:10:20 +00:00
User salt user/group for running salt-master
This commit is contained in:
parent
d165b320b1
commit
9d259f37d9
3 changed files with 9 additions and 2 deletions
|
@ -25,7 +25,7 @@
|
|||
# permissions to allow the specified user to run the master. The exception is
|
||||
# the job cache, which must be deleted if this user is changed. If the
|
||||
# modified files cause conflicts, set verify_env to False.
|
||||
#user: root
|
||||
#user: salt
|
||||
|
||||
# Tell the master to also use salt-ssh when running commands against minions.
|
||||
#enable_ssh_minions: False
|
||||
|
|
|
@ -320,6 +320,13 @@ rm -rf %{buildroot}
|
|||
%{_bindir}/salt-ssh
|
||||
%config(noreplace) %{_sysconfdir}/salt/roster
|
||||
|
||||
# Add salt user/group for Salt Master
|
||||
%pre master
|
||||
getent group salt >/dev/null || groupadd -r salt
|
||||
getent passwd salt >/dev/null || \
|
||||
#useradd -r -g salt -d HOMEDIR -s /sbin/nologin \
|
||||
useradd -r -g salt -s /sbin/nologin \
|
||||
-c "Salt user for Salt Master" salt
|
||||
|
||||
# assumes systemd for RHEL 7 & 8 & 9
|
||||
%preun master
|
||||
|
|
|
@ -75,7 +75,7 @@ else:
|
|||
_DFLT_IPC_MODE = "ipc"
|
||||
_DFLT_FQDNS_GRAINS = False
|
||||
_MASTER_TRIES = 1
|
||||
_MASTER_USER = salt.utils.user.get_user()
|
||||
_MASTER_USER = "salt"
|
||||
|
||||
|
||||
def _gather_buffer_space():
|
||||
|
|
Loading…
Add table
Reference in a new issue