Add support for kubectl connection

This change enable using the base job with a kubectl host where
the prepare-workspace can't be use.

Change-Id: Idb5afc38a23d1dcfa63727ef93f9216179481fea
This commit is contained in:
Tristan de Cacqueray 2019-09-06 14:30:16 +00:00
parent 4c7aa7ea35
commit ed5ecda73d
1 changed files with 15 additions and 5 deletions

View File

@ -1,10 +1,20 @@
- hosts: all
tasks:
- block:
- import_role: name=add-build-sshkey
- import_role: name=prepare-workspace
# This role ensures basic connectivity and produces some
# helpful information in zuul-info/
- import_role: name=validate-host
when: "ansible_connection != 'kubectl'"
- block:
- import_role: name=remove-zuul-sshkey
- import_role: name=prepare-workspace-openshift
run_once: true
when: "ansible_connection == 'kubectl'"
- hosts: all
roles:
- add-build-sshkey
- prepare-workspace
# This role ensures basic connectivity and produces some
# helpful information in zuul-info/
- validate-host
# This role ensures standard output directories are created
# on each remote node
- ensure-output-dirs