Skip to content

Commit

Permalink
Merge pull request #7225 from tzumainn/openstack-ansible-abort-on-fai…
Browse files Browse the repository at this point in the history
…lure

Automatic merge from submit-queue.

Add any_errors_fatal to openstack playbooks
  • Loading branch information
openshift-merge-robot committed Mar 7, 2018
2 parents 5f34fe3 + bb20e09 commit 38a82a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion playbooks/openstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions playbooks/openstack/openshift-cluster/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions playbooks/openstack/openshift-cluster/prerequisites.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- hosts: localhost
any_errors_fatal: true
tasks:
- name: Check dependencies and OpenStack prerequisites
import_role:
Expand Down
4 changes: 4 additions & 0 deletions playbooks/openstack/openshift-cluster/provision.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 38a82a0

Please sign in to comment.