--- - hosts: localhost connection: local force_handlers: true roles: - name: fedora when: ansible_distribution == 'Fedora' - name: gnome when: ansible_env.DESKTOP_SESSION == 'gnome'