summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-26 10:24:50 -0800
committerGitHub <noreply@github.com>2018-01-26 10:24:50 -0800
commit1621ce6ff30d87a3daeb2f1d624c7fa3e01329aa (patch)
treeb5d9bffa77249f56f3c44018eeacda730aeb54a6
parentb04394c517b906d9a7bc87691b5cabca79b3ebb2 (diff)
parent6ececc8d45da31895ac07bb7d835b09666e30548 (diff)
downloadopenshift-1621ce6ff30d87a3daeb2f1d624c7fa3e01329aa.tar.gz
openshift-1621ce6ff30d87a3daeb2f1d624c7fa3e01329aa.tar.bz2
openshift-1621ce6ff30d87a3daeb2f1d624c7fa3e01329aa.tar.xz
openshift-1621ce6ff30d87a3daeb2f1d624c7fa3e01329aa.zip
Merge pull request #6862 from ewolinetz/deprecate_use_callback
Automatic merge from submit-queue. Updating deprecations to use callback plugin Instead of just pausing during the run and relying on users to see it, instead format and print the deprecated variables at the end of play instead like this: ``` Initialization : Complete (0:00:23) [DEPRECATION WARNING]: The following are deprecated variables and will be no longer be used in the next minor release. Please update your inventory accordingly. openshift_hosted_logging_deploy openshift_hosted_metrics_deployer_prefix ``` The plugin changes are the same as the changes made in https://github.com/openshift/openshift-ansible/pull/6734
-rw-r--r--playbooks/deploy_cluster.yml8
-rw-r--r--roles/openshift_sanitize_inventory/tasks/deprecations.yml9
-rw-r--r--roles/openshift_sanitize_inventory/vars/main.yml2
3 files changed, 7 insertions, 12 deletions
diff --git a/playbooks/deploy_cluster.yml b/playbooks/deploy_cluster.yml
index 361553ee4..c8e30ddbc 100644
--- a/playbooks/deploy_cluster.yml
+++ b/playbooks/deploy_cluster.yml
@@ -6,11 +6,3 @@
- import_playbook: openshift-node/private/config.yml
- import_playbook: common/private/components.yml
-
-- name: Print deprecated variable warning message if necessary
- hosts: oo_first_master
- gather_facts: no
- tasks:
- - debug: msg="{{__deprecation_message}}"
- when:
- - __deprecation_message | default ('') | length > 0
diff --git a/roles/openshift_sanitize_inventory/tasks/deprecations.yml b/roles/openshift_sanitize_inventory/tasks/deprecations.yml
index 795b8ee60..b1ddbc07a 100644
--- a/roles/openshift_sanitize_inventory/tasks/deprecations.yml
+++ b/roles/openshift_sanitize_inventory/tasks/deprecations.yml
@@ -2,15 +2,18 @@
- name: Check for usage of deprecated variables
set_fact:
- __deprecation_message: "{{ __deprecation_message | default([]) }} + ['{{ __deprecation_header }} {{ item }} is a deprecated variable and will be no longer be used in the next minor release. Please update your inventory accordingly.']"
+ __deprecation_message: "{{ __deprecation_message | default( __deprecation_header ) }} \n\t{{ item }}"
when:
- hostvars[inventory_hostname][item] is defined
with_items: "{{ __warn_deprecated_vars }}"
- block:
- debug: msg="{{__deprecation_message}}"
- - pause:
- seconds: "{{ 10 }}"
+ - run_once: true
+ set_stats:
+ data:
+ installer_phase_initialize:
+ message: "{{ __deprecation_message }}"
when:
- __deprecation_message | default ('') | length > 0
diff --git a/roles/openshift_sanitize_inventory/vars/main.yml b/roles/openshift_sanitize_inventory/vars/main.yml
index df15948d2..51c6e0a64 100644
--- a/roles/openshift_sanitize_inventory/vars/main.yml
+++ b/roles/openshift_sanitize_inventory/vars/main.yml
@@ -1,6 +1,6 @@
---
-__deprecation_header: "[DEPRECATION WARNING]:"
+__deprecation_header: "[DEPRECATION WARNING]: The following are deprecated variables and will be no longer be used in the next minor release. Please update your inventory accordingly."
# this is a list of variables that we will be deprecating within the next minor release, this list should be expected to change from release to release
__warn_deprecated_vars: