--- - name: Ensure that the short hostname is set hostname: name: "{{ sap_hostname }}" - name: "Ensure that the length of the hostname is not longer than 'sap_preconfigure_max_hostname_length'" assert: that: "{{ sap_hostname | length | int }} <= {{ sap_preconfigure_max_hostname_length | int }}" msg: "The length of the hostname is {{ sap_hostname | length | int }} but must be less or equal to {{ sap_preconfigure_max_hostname_length }} (variable 'sap_preconfigure_max_hostname_length')!"