浏览代码

Only run no_log on task that scrapes all inventory variables

Scott Dodson 7 年之前
父节点
当前提交
af928157ef
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 0 1
      playbooks/init/basic_facts.yml
  2. 3 1
      roles/openshift_sanitize_inventory/tasks/deprecations.yml

+ 0 - 1
playbooks/init/basic_facts.yml

@@ -15,7 +15,6 @@
   - name: Run openshift_sanitize_inventory to set variables
   - name: Run openshift_sanitize_inventory to set variables
     import_role:
     import_role:
       name: openshift_sanitize_inventory
       name: openshift_sanitize_inventory
-    no_log: True
 
 
   - name: Detecting Operating System from ostree_booted
   - name: Detecting Operating System from ostree_booted
     stat:
     stat:

+ 3 - 1
roles/openshift_sanitize_inventory/tasks/deprecations.yml

@@ -1,11 +1,13 @@
 ---
 ---
-
+# Since this task scrapes all inventory variables which may contain sensitive bits
+# mark it no_log
 - name: Check for usage of deprecated variables
 - name: Check for usage of deprecated variables
   check_deprecated:
   check_deprecated:
     facts: "{{ hostvars[inventory_hostname] }}"
     facts: "{{ hostvars[inventory_hostname] }}"
     vars: "{{ __warn_deprecated_vars }}"
     vars: "{{ __warn_deprecated_vars }}"
     header: "{{ __deprecation_header }}"
     header: "{{ __deprecation_header }}"
   register: dep_check
   register: dep_check
+  no_log: true
 
 
 - block:
 - block:
   - debug: msg="{{ dep_check.msg }}"
   - debug: msg="{{ dep_check.msg }}"