--- # Copyright 2019 VEXXHOST, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - hosts: masters tasks: - name: Test kue-cli shell: >- kue-cli --user {{ ansible_user }} {% for master in groups['masters'] %}--master {{ hostvars[master]['ansible_host'] }} {% endfor %}{% for minion in groups['minions'] %}--minion {{ hostvars[minion]['ansible_host'] }} {% endfor %} - hosts: masters[0] tasks: - name: Download sonobuoy become: true unarchive: src: https://github.com/heptio/sonobuoy/releases/download/v0.15.2/sonobuoy_0.15.2_linux_amd64.tar.gz dest: /usr/local/bin remote_src: yes - name: Run sonobuoy (quick-mode) shell: sonobuoy run --wait --e2e-parallel y - name: Retrieve sonobuoy results shell: "sonobuoy retrieve {{ ansible_user_dir }}/zuul-output" register: _sonobuoy_retrieve - name: Unarchive results unarchive: src: "{{ _sonobuoy_retrieve.stdout }}" dest: "{{ ansible_user_dir }}/zuul-output/logs" remote_src: true - name: Get sonobuoy results shell: "sonobuoy results {{ _sonobuoy_retrieve.stdout }}" register: _sonobuoy_results - name: Check if sonobuoy passed assert: that: '"Status: passed" in _sonobuoy_results.stdout'