diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-10-19 16:28:53 -0400 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-10-20 16:04:39 -0400 |
commit | 7d88f8dada9f19dd6b49af9bb539e43aaa15f138 (patch) | |
tree | 0711e86d6692bbccecd0b93e5e7742fc6ce0cc83 /roles/openshift_management/tasks/add_many_container_providers.yml | |
parent | f3741a05097f1848d2b3e9a01f03e76a33487e01 (diff) | |
download | openshift-7d88f8dada9f19dd6b49af9bb539e43aaa15f138.tar.gz openshift-7d88f8dada9f19dd6b49af9bb539e43aaa15f138.tar.bz2 openshift-7d88f8dada9f19dd6b49af9bb539e43aaa15f138.tar.xz openshift-7d88f8dada9f19dd6b49af9bb539e43aaa15f138.zip |
Refactor adding multiple container providers
Diffstat (limited to 'roles/openshift_management/tasks/add_many_container_providers.yml')
-rw-r--r-- | roles/openshift_management/tasks/add_many_container_providers.yml | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/roles/openshift_management/tasks/add_many_container_providers.yml b/roles/openshift_management/tasks/add_many_container_providers.yml index f92c81277..10a1f4c83 100644 --- a/roles/openshift_management/tasks/add_many_container_providers.yml +++ b/roles/openshift_management/tasks/add_many_container_providers.yml @@ -1,9 +1,15 @@ --- -- hosts: "{{ groups['masters'][0] }}" +- hosts: localhost tasks: + - name: Ensure the container provider configuration is defined + assert: + that: container_providers_config is defined + msg: | + Error: Must provide providers config path. Fix: Add '-e container_providers_config=/path/to/your/config' to the ansible-playbook command + - name: Include providers/management configuration include_vars: - file: "{{ openshift_management_many_container_providers_config }}" + file: "{{ container_providers_config }}" - name: Ensure this cluster is a container provider uri: @@ -20,8 +26,16 @@ with_items: "{{ container_providers }}" register: results - - name: Ensure failed additions are reported for each container provider + # TODO: Make this prettier and easier to read + - name: Save results + copy: + dest: /tmp/results.json + content: "{{ results.results | to_nice_json }}" + # state: present + # debug: + # var: item.item + # with_items: "{{ results.results }}" + + - name: print each result debug: - msg: | - FLOOP {{ item.item.hostname }} - with_items: "{{ results.results }}" + msg: "{{ results.results | oo_filter_container_providers }}" |