Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions roles/edpm_nodes_validation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@
ansible.builtin.command: hostname -f
register: hostname
changed_when: false

- name: Verify a FQDN is set
ansible.builtin.assert:
that: hostname.stdout.find(".") != -1
fail_msg: "{{ hostname.stdout }} does not contain . and does not appear to be an FQDN."
success_msg: "{{ hostname.stdout }} contains . and appears to be an FQDN."
retries: 5
delay: 60
until: hostname.stdout.find(".") != -1
rescue:
- name: Fail if hostname is not FQDN
ansible.builtin.fail:
msg: "{{ hostname.stdout }} does not contain . and does not appear to be an FQDN."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add delays/retries when we aren't sure what we're delaying for. Do we have enough debug information to tell what the missing configuration actually was? If not, perhaps we can add some debug tasks to show that (e.g., can't actually reach DNS, etc).


- name: Verify the configured FQDN vs {{ edpm_nodes_validation_validate_fqdn_hosts_file }}
ansible.builtin.shell: |
Expand Down