From the course: Red Hat Certified Engineer (EX294) Cert Prep: 3 Managing Systems with Ansible

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Advanced user creation

Advanced user creation

- [Instructor] Now let's take user management to the next level. In the Exercise Files directory for this chapter, there are two files that we'll want to take a look at. Change to this chapters Exercise Files directory and view the webadmins.yml file using vim. Type in vim space webadmins.yml and hit Enter. Press Z and uppercase R to expand the folds. This is a user data file similar to what we just created by using a dictionary. In this file, we have a dictionary named webadmins. In the dictionary for each named item, we have usernames and other attributes such as the comment or geckos field, the shell, and supplemental groups. You could add any other fields that you want for each user such as a primary group, userID, groupID, account expiration date, whether the password is locked, or even whether the account is locked and so on. Now, let's look at the playbook file that utilizes the dictionary, press escape colon…

Contents