diff --git a/ansible/00-check-cluster-config.yml b/ansible/00-check-cluster-config.yml new file mode 100644 index 00000000..9b4182fe --- /dev/null +++ b/ansible/00-check-cluster-config.yml @@ -0,0 +1,30 @@ +--- +- name: Ensure required options are present + hosts: all + gather_facts: no + vars_files: + - ../cluster.yml + tasks: + + - name: Check if `cluster_name` is configured + ansible.builtin.fail: + msg: "`cluster_name` is a mandatory setting, please define it in `cluster.yml`" + when: cluster_name is not defined + + - name: Check if `dns_provider` is configured + ansible.builtin.fail: + msg: |- + `dns_provider` is a mandatory setting, please define it in `cluster.yml` with + one of the following values: route53, cloudflare, gcp, azure,transip, hetzner or none + Please check the README.md for most updated list. + when: dns_provider is not defined + + - name: Check if `image_pull_secret` is configured + ansible.builtin.fail: + msg: "`image_pull_secret` is a mandatory setting, please define it in `cluster.yml`" + when: image_pull_secret is not defined and image_pull_secret | json_query('auths.quay\.io') | length == 0 + + - name: Check if `public_domain` is configured + ansible.builtin.fail: + msg: "`public_domain` is a mandatory setting, please define it in `cluster.yml`" + when: public_domain is not defined diff --git a/ansible/02-create-cluster.yml b/ansible/02-create-cluster.yml index 3ad70a6f..b848351b 100644 --- a/ansible/02-create-cluster.yml +++ b/ansible/02-create-cluster.yml @@ -7,11 +7,6 @@ - ../cluster.yml tasks: - - name: Check IPv6 & OpenShift version 4.12 or greater - ansible.builtin.fail: - msg: "Currently, it is not possible to install OpenShift 4.12 with IPv6 enabled with hetzner-ocp4 because of Issue #247" - when: (ip_families is defined and "IPv6" in ip_families) and (openshift_version is defined and openshift_version >= "4.12") - - name: Deploy cluster import_role: name: openshift-4-cluster diff --git a/ansible/setup.yml b/ansible/setup.yml index 9ba76fc9..276abbe0 100644 --- a/ansible/setup.yml +++ b/ansible/setup.yml @@ -1,3 +1,5 @@ --- -- import_playbook: 01-prepare-host.yml -- import_playbook: 02-create-cluster.yml +- ansible.builtin.import_playbook: 00-check-cluster-config.yml +- ansible.builtin.import_playbook: 00-provision-hetzner.yml +- ansible.builtin.import_playbook: 01-prepare-host.yml +- ansible.builtin.import_playbook: 02-create-cluster.yml diff --git a/docs/release-notes.md b/docs/release-notes.md index 34df73cd..8c144fbc 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,5 +1,10 @@ # RELEASE NOTES +## 2023-05-13 + * Added pre-check routines to avoid failing at a later time + - all parameters which are required have to be provided, otherwise the playbook will fail early. + * Removed blocker for installation of OpenShift 4.12 with IPv6 enabled. Installation is now completing without issues. + ## 2023-04-14 * Bump OpenShift version to 4.12.10