Variables are one of the most important features of any language or tool used to set user-defined data and manipulate it as and when required. In this recipe, you will learn how to set variables in Salt states and use the variables to do some advanced task.
user. In the minion, configure the following grain:
/opt/salt-cookbook/pillar/staging/user/init.slsfile to have the following contents:
app_user_list: optimus: uid: 7001 passwd: $1$Cf1V2QaF$.qyeAQ34CLqyvEnes7/VH1 bumblebee: uid: 7002 passwd: $1$KvbpASt.$L97XRqLVc0OaspatEE/n4/ db_user_list: megatron: uid: 7001 passwd: $1$8J9bAeG6$HMMV.EoMycJyLL.pb6kHj0 ...