diff options
author | Jeff Cantrill <jcantril@redhat.com> | 2017-01-19 19:25:45 -0500 |
---|---|---|
committer | Jeff Cantrill <jcantril@redhat.com> | 2017-01-19 19:25:45 -0500 |
commit | ebd4158724ffa3db880fa5604d1389c58f0f9399 (patch) | |
tree | 7578dd70bc5808d8e5f15d15e96e32ea4390754a /roles | |
parent | 1df10b57ea457bb186b3403d4fab06f0db28d11c (diff) | |
download | openshift-ebd4158724ffa3db880fa5604d1389c58f0f9399.tar.gz openshift-ebd4158724ffa3db880fa5604d1389c58f0f9399.tar.bz2 openshift-ebd4158724ffa3db880fa5604d1389c58f0f9399.tar.xz openshift-ebd4158724ffa3db880fa5604d1389c58f0f9399.zip |
fix oc_apply to allow running on any control node
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_logging/tasks/install_logging.yaml | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index af03e9371..a9699adb8 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -23,23 +23,30 @@ loop_control: loop_var: install_component +- find: paths={{ mktemp.stdout }}/templates patterns=*.yaml + register: object_def_files + changed_when: no + +- slurp: src={{item}} + register: object_defs + with_items: "{{object_def_files.files | map(attribute='path') | list | sort}}" + changed_when: no + - name: Create objects include: oc_apply.yaml vars: - kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig" - namespace: "{{ openshift_logging_namespace }}" - - file_name: "{{ file }}" - - file_content: "{{ lookup('file', file) | from_yaml }}" - with_fileglob: - - "{{ mktemp.stdout }}/templates/*.yaml" + - file_name: "{{ file.source }}" + - file_content: "{{ file.content | b64decode | from_yaml }}" + with_items: "{{ object_defs.results }}" loop_control: loop_var: file when: not ansible_check_mode - name: Printing out objects to create - debug: msg="{{lookup('file', file)|quote}}" - with_fileglob: - - "{{mktemp.stdout}}/templates/*.yaml" + debug: msg={{file.content | b64decode }} + with_items: "{{ object_defs.results }}" loop_control: loop_var: file when: ansible_check_mode |