From 0b4fcc83bd972a959427551f6ebf7ae7e6a1874f Mon Sep 17 00:00:00 2001
From: Matthew Mosesohn <matthew.mosesohn@gmail.com>
Date: Fri, 20 Oct 2017 08:25:57 +0100
Subject: [PATCH] Fix up warnings and deprecations (#1848)

---
 roles/bootstrap-os/tasks/main.yml                     | 4 ----
 roles/etcd/tasks/check_certs.yml                      | 2 +-
 roles/kubernetes/master/tasks/main.yml                | 4 ++--
 roles/kubernetes/preinstall/tasks/verify-settings.yml | 6 +++---
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml
index 5d5f05193..bb6937902 100644
--- a/roles/bootstrap-os/tasks/main.yml
+++ b/roles/bootstrap-os/tasks/main.yml
@@ -11,10 +11,6 @@
 - include: bootstrap-centos.yml
   when: bootstrap_os == "centos"
 
-- task:
-  debug:
-    msg: "bootstrap_os: {{ bootstrap_os|d('') }}"
-
 - include: setup-pipelining.yml
 
 - name: check if atomic host
diff --git a/roles/etcd/tasks/check_certs.yml b/roles/etcd/tasks/check_certs.yml
index 8795fe820..337220397 100644
--- a/roles/etcd/tasks/check_certs.yml
+++ b/roles/etcd/tasks/check_certs.yml
@@ -26,7 +26,7 @@
 - name: "Check_certs | Set 'gen_certs' to true"
   set_fact:
     gen_certs: true
-  when: "not '{{ item }}' in etcdcert_master.files|map(attribute='path') | list"
+  when: not item in etcdcert_master.files|map(attribute='path') | list
   run_once: true
   with_items: >-
        ['{{etcd_cert_dir}}/ca.pem',
diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml
index 6739443eb..edc788f72 100644
--- a/roles/kubernetes/master/tasks/main.yml
+++ b/roles/kubernetes/master/tasks/main.yml
@@ -41,10 +41,10 @@
     - kubectl
     - upgrade
 
-- task: Include kubeadm setup if enabled
+- name: Include kubeadm setup if enabled
   include: kubeadm-setup.yml
   when: kubeadm_enabled|bool|default(false)
 
-- task: Include static pod setup if not using kubeadm
+- name: Include static pod setup if not using kubeadm
   include: static-pod-setup.yml
   when: not kubeadm_enabled|bool|default(false)
diff --git a/roles/kubernetes/preinstall/tasks/verify-settings.yml b/roles/kubernetes/preinstall/tasks/verify-settings.yml
index aabffb62d..288964bd1 100644
--- a/roles/kubernetes/preinstall/tasks/verify-settings.yml
+++ b/roles/kubernetes/preinstall/tasks/verify-settings.yml
@@ -30,8 +30,8 @@
 
 - name: "Stop if known booleans are set as strings (Use JSON format on CLI: -e \"{'key': true }\")"
   assert:
-    that: hostvars[inventory_hostname][item]|type_debug == 'bool'
-    msg: "{{hostvars[inventory_hostname][item]}} isn't a bool"
+    that: vars[item]|type_debug == 'bool'
+    msg: "{{vars[item]}} isn't a bool"
   run_once: yes
   with_items:
     - kubeadm_enabled
@@ -40,7 +40,7 @@
     - download_always_pull
     - efk_enabled
     - helm_enabled
-    - openstack_lbaas_Enabled
+    - openstack_lbaas_enabled
     - rbac_enabled
   ignore_errors: "{{ ignore_assert_errors }}"
 
-- 
GitLab