kue/playbooks/run.yaml
Mohammed Naser cc4ec215d3 ship playbooks with python
This patch makes the playbooks ship directly with the Python
files which means no need to run inside working directory.

Change-Id: I3f2d3c95a8443383b47d806e293c9bb75d9fcec7
2019-08-23 14:26:15 -04:00

50 lines
1.8 KiB
YAML

---
# 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'