Update validate_hostname.yml
# limitations under the License.
---
+- name: Validate hostname
+ block:
- name: Fetch the hostname
ansible.builtin.command: hostname -s
register: machine_hostname
- hostvars['127.0.0.1']['domain_name'] == ms_domain_name
success_msg: "{{ server_domain_name_success }}"
fail_msg: "{{ server_domain_name_fail }}"
+ when: hostvars['127.0.0.1']['ldap_required'] or
+ hostvars['127.0.0.1']['freeipa_required']
