--- - hosts: '{{ ip_addr }}' become: yes become_method: sudo gather_facts: yes tasks: - name: "[CONFIG LOCALES] Comprobando si es necesario configurar locales" debug: msg: "No es necesario configurar locales en la máquina" when: locales_enabled is not defined or not locales_enabled - name: "[CONFIG LOCALES] Set locales" import_role: name: config-locales when: locales_enabled is defined and locales_enabled