- name: Create group when: not mac_os become: true tags: always ansible.builtin.group: name: "{{ username }}" state: present - name: Create user when: not mac_os become: true tags: always ansible.builtin.user: name: "{{ username }}" update_password: "on_create" create_home: yes group: "{{ username }}"