diff --git a/playbooks/openstack/README.md b/playbooks/openstack/README.md index 62549724b8b..e9876dd2e6f 100644 --- a/playbooks/openstack/README.md +++ b/playbooks/openstack/README.md @@ -192,7 +192,16 @@ copy it to the directory you're going to run `ansible-playbook` from. $ cp openshift-ansible/ansible.cfg ansible.cfg ``` -Then run the provision + install playbook -- this will create the OpenStack +We recommend adding an additional option: + +```cfg +any_errors_fatal = true +``` + +This will abort the Ansible playbook execution as soon as any error is +encountered. + +Now, run the provision + install playbook -- this will create the OpenStack resources: ```bash diff --git a/playbooks/openstack/openshift-cluster/install.yml b/playbooks/openstack/openshift-cluster/install.yml index 69ab98cd2d6..63181c7d617 100644 --- a/playbooks/openstack/openshift-cluster/install.yml +++ b/playbooks/openstack/openshift-cluster/install.yml @@ -11,6 +11,7 @@ - import_playbook: ../../prerequisites.yml - name: Prepare the Nodes in the cluster for installation + any_errors_fatal: true hosts: oo_all_hosts become: yes gather_facts: yes diff --git a/playbooks/openstack/openshift-cluster/prerequisites.yml b/playbooks/openstack/openshift-cluster/prerequisites.yml index 8bb70050150..1b924585416 100644 --- a/playbooks/openstack/openshift-cluster/prerequisites.yml +++ b/playbooks/openstack/openshift-cluster/prerequisites.yml @@ -1,5 +1,6 @@ --- - hosts: localhost + any_errors_fatal: true tasks: - name: Check dependencies and OpenStack prerequisites import_role: diff --git a/playbooks/openstack/openshift-cluster/provision.yml b/playbooks/openstack/openshift-cluster/provision.yml index b2cc3af968c..071e3a24e4a 100644 --- a/playbooks/openstack/openshift-cluster/provision.yml +++ b/playbooks/openstack/openshift-cluster/provision.yml @@ -1,5 +1,6 @@ --- - name: Create the OpenStack resources for cluster installation + any_errors_fatal: true hosts: localhost tasks: - name: retrieve cluster name from the environment if present @@ -17,6 +18,7 @@ - name: Wait for the nodes and gather their facts + any_errors_fatal: true hosts: oo_all_hosts become: yes # NOTE: The nodes may not be up yet, don't gather facts here. @@ -33,6 +35,7 @@ # TODO(shadower): consider splitting this up so people can stop here # and configure their DNS if they have to. - name: Populate the DNS entries + any_errors_fatal: true hosts: localhost tasks: - name: Populate DNS entries @@ -47,6 +50,7 @@ - import_playbook: ../../init/basic_facts.yml - name: Optionally subscribe the RHEL nodes + any_errors_fatal: true hosts: oo_all_hosts become: yes gather_facts: yes