The need to do the same task repeatedly for a number of entities of the same type is a very basic requirement of any role in an organization. To achieve this, languages and tools provide us with the feature of iterations, simply known as loops. In this recipe, you will learn how to apply iterations in our configuration.
edit /opt/salt-cookbook/pillar/staging/user/init.slsto have the following contents:
dev_user_list: optimus: uid: 7001 passwd: '$1$Dw1TxMI7$pmeYTdmz.rlunqPd7JELR.' bumblebee: uid: 7002 passwd: '$1$ZHUeIAfq$6sJl9rHVDX2UjBH1KrPZP1' ironhide: uid: 7003 passwd: '$1$rcJAiq7y$bJzv3HzVTbeQlA3cIu1Gb1'