Ansible: Add user to a group

From Glitchdata
Jump to navigation Jump to search

Prefer atomic commands for creating and adding users to groups.

- name: Adding existing user '{{ user }}' to group sudo
  user: name='{{ user }}'
        groups=sudo, users
        append=yes


Related