/ansible-role-users

GNU General Public License v3.0GPL-3.0

gplv3 Maintenance

ckaserer.users

The users role allows you to create users on your target node with random passwords.

First you need to install the role on the node from which you will execute ansible via

ansible-galaxy install ckaserer.users

Create Users

The playbook below creates two users, ckaserer and jdoe, and sets a random password for each user stored in their home directory as .password.

- hosts: localhost
  tasks:
    - name: "Include ckaserer.users"
      include_role:
        name: "ckaserer.users"
        vars:
          users: 
            - ckaserer
            - jdoe