deprecations.yml 759 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Check for usage of deprecated variables
  3. set_fact:
  4. __deprecation_message: "{{ __deprecation_message | default( __deprecation_header ) }} \n\t{{ item }}"
  5. when:
  6. - hostvars[inventory_hostname][item] is defined
  7. with_items: "{{ __warn_deprecated_vars }}"
  8. - block:
  9. - debug: msg="{{__deprecation_message}}"
  10. - run_once: true
  11. set_stats:
  12. data:
  13. installer_phase_initialize:
  14. message: "{{ __deprecation_message }}"
  15. when:
  16. - __deprecation_message | default ('') | length > 0
  17. # for with_fileglob Ansible resolves the path relative to the roles/<rolename>/files directory
  18. - name: Assign deprecated variables to correct counterparts
  19. include_tasks: "{{ item }}"
  20. with_fileglob:
  21. - "../tasks/__deprecations_*.yml"