Skip to content
Snippets Groups Projects
Unverified Commit 855f2a55 authored by Rong Zhang's avatar Rong Zhang Committed by GitHub
Browse files

Merge pull request #3135 from ishitatsuyuki/patch-1

Add bad hostname preflight check
parents ea35e6be 3eef8dc8
Branches
Tags
No related merge requests found
......@@ -103,3 +103,9 @@
that: ansible_kernel.split('-')[0]|version_compare('4.8', '>=')
when: kube_network_plugin == 'cilium'
ignore_errors: "{{ ignore_assert_errors }}"
- name: Stop if bad hostname
assert:
that: inventory_hostname | match("[a-z0-9]([-a-z0-9]*[a-z0-9])?$")
msg: "Hostname must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character"
ignore_errors: "{{ ignore_assert_errors }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment