---
- name: Debug Information
  block:
    - name: Debug r_twr_host_list
      debug:
        var: r_twr_host_list


    - name: Debug add host to tower if not exist
      debug:
        msg: "[NOT_EXIST] adding {{ item.inventory_hostname }} to tower :: group: {{ item.tower_group }}"
      loop: "{{ r_csv_hosts }}"
      loop_control:
        label: "{{ item.inventory_hostname }}"
      when:
        - r_twr_host_list[item.inventory_hostname] is not defined


    - name: Debug add host to tower, but only if host is not in correct groups
      debug:
        msg: "[UPDATE] adding {{ item.inventory_hostname }} to tower group {{ item.tower_group }}"
      loop: "{{ r_csv_hosts }}"
      loop_control:
        label: "{{ item.inventory_hostname }}"
      when:
        - r_twr_host_list[item.inventory_hostname] is defined
        - r_twr_host_list[item.inventory_hostname].groups[item.tower_group] is not defined
  when:
    - __show_debug_msgs | bool


...
