---
- name: Debug apt repository issues
  hosts: beijing:children
  become: yes
  ignore_unreachable: yes
  tasks:
    - name: Run apt-get update to capture error
      ansible.builtin.shell: apt-get update
      register: apt_update_result
      failed_when: false
      changed_when: false

    - name: Display apt-get update stderr
      ansible.builtin.debug:
        var: apt_update_result.stderr
        verbosity: 2