You can use variables in ansible plays to store values like users to create, packages to install etc. By using variables, you can manage your plays with dynamic input values.
See Automation with Ansible full chapters.
Example Variable usages:
Users to create Packages to install Services to restart Files to more or create Refer : Ansible Documentation