Users and groups constitute some of the fundamental components of any infrastructure, starting from users logging in to systems, to running applications and databases as a particular user. In this recipe, you will learn how to configure users and groups with Salt.
Configure a minion called
salt-minion in the staging environment, and create two states called
users by creating respective directories for them. In the base pillar directory of the staging environment, create two directories called
/opt/salt-cookbook/pillar/staging/groups/init.slsto have the following entries:
app_group: group_name: stg-app group_id: 2001