mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-28 00:48:22 +01:00
43c4707d2a
The state will not fail gracefully, instead you will get an error like this one: ID: users_rhertzog_user_gitconfig_0 Function: git.config_set Name: alias.br Result: False Comment: State 'git.config_set' was not found in SLS 'users' Reason: 'git' __virtual__ returned False Changes: And since pillar data can't be (easily) tuned according to minion's status, we really need this check here. My tests with Salt 2017.7.3 have shown that cmd.has_exec() is reliable for this, contrary the what the comment was implying. |
||
---|---|---|
users | ||
LICENSE | ||
pillar.example | ||
README.rst |
===== users ===== Formula to configure users via pillar. .. note:: See the full `Salt Formulas installation and usage instructions <http://docs.saltstack.com/topics/development/conventions/formulas.html>`_. Available states ================ .. contents:: :local: ``users`` --------- Configures a user's home directory, group, the user itself, secondary groups, and associated keys. Also configures sudo access, and absent users. ``users.sudo`` -------------- Ensures the sudo group exists, the sudo package is installed and the sudo file is configured. ``users.bashrc`` ---------------- Ensures the bashrc file exists in the users home directory. Sets 'manage_bashrc: True' in pillar per user. Defaults to False. ``users.profile`` ---------------- Ensures the profile file exists in the users home directory. Sets 'manage_profile: True' in pillar per user. Defaults to False. ``users.vimrc`` --------------- Ensures the vimrc file exists in the users home directory. Sets 'manage_vimrc: True' in pillar per user. Defaults to False. This depends on the vim-formula to be installed. ``users.user_files`` --------------- Permits the abitrary management of files. See pillar.example for configuration details. Overriding default values ========================= In order to separate actual user account definitions from configuration the pillar ``users-formula`` was introduced: .. code-block:: yaml users: myuser: # stuff users-formula: lookup: root_group: toor shell: '/bin/zsh'