Ansible: Add user to a group

From Glitchdata
Revision as of 21:22, 20 February 2017 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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