any idea how I can create a user and then put it into multiple groups with jinja2?
- name: create user sam
ansible.builtin.user:
name: ‘{{ username }}’
shell: ‘{{ shell }}’
generate_ssh_key: yes
create_home: yes
groups: “‘{{ username }}’,‘{{ groupname }}’”
append: yes
ssh_key_file: .ssh/id_rsa
become: true
where {{ username }} is sam
{{ groupname }} is docker