From 5903aea86fa1b20dd69ed404f9da8df31eee7841 Mon Sep 17 00:00:00 2001
From: Matthew Mosesohn <matthew.mosesohn@gmail.com>
Date: Mon, 12 Feb 2018 12:38:06 +0100
Subject: [PATCH] Update coreos-calico-aio scenario to test no group vars
 (#2314)

This updated scenario ensures deployment still passes without
having any group_vars available.
---
 tests/cloud_playbooks/create-gce.yml | 8 ++++++++
 tests/files/coreos-calico-aio.yml    | 1 +
 2 files changed, 9 insertions(+)

diff --git a/tests/cloud_playbooks/create-gce.yml b/tests/cloud_playbooks/create-gce.yml
index fdb20e375..616c15439 100644
--- a/tests/cloud_playbooks/create-gce.yml
+++ b/tests/cloud_playbooks/create-gce.yml
@@ -7,6 +7,7 @@
     mode: default
     preemptible: no
     ci_job_name: "{{ lookup('env', 'CI_JOB_NAME') }}"
+    delete_group_vars: no
   tasks:
     - name: include vars for test {{ ci_job_name }}
       include_vars: "../files/{{ ci_job_name }}.yml"
@@ -64,6 +65,13 @@
         dest: "{{ inventory_path|dirname }}/group_vars/fake_hosts.yml"
       when: mode in ['scale', 'separate-scale', 'ha-scale']
 
+    - name: Delete group_vars directory
+      file:
+        path: "{{ inventory_path|dirname }}/group_vars"
+        state: absent
+        recurse: yes
+      when: delete_group_vars
+
 - name: Wait for instances
   hosts: "waitfor_hosts"
   gather_facts: false
diff --git a/tests/files/coreos-calico-aio.yml b/tests/files/coreos-calico-aio.yml
index b1d06fc6f..123556550 100644
--- a/tests/files/coreos-calico-aio.yml
+++ b/tests/files/coreos-calico-aio.yml
@@ -7,6 +7,7 @@ mode: aio
 startup_script: 'systemctl disable locksmithd && systemctl stop locksmithd'
 
 # Deployment settings
+no_group_vars: true
 bootstrap_os: coreos
 kube_network_plugin: calico
 resolvconf_mode: host_resolvconf # this is required as long as the coreos stable channel uses docker < 1.12
-- 
GitLab