- hosts: all tasks: - include: add-user-debian.yaml when: ansible_os_family == 'Debian' - include: add-user-redhat.yaml when: ansible_os_family == 'RedHat'