--- - name: Ensure essential tools are installed on all hosts hosts: all become: true vars: # Base tools required everywhere base_packages: - curl # used for API calls, downloads - git # version control / pulling repos - ca-certificates # ensures HTTPS works - iproute2 # modern networking tools (ip a, ip r) # Extra tools for troubleshooting / convenience extra_packages: - jq # parse JSON (docker inspect, APIs) - htop # friendlier process viewer - unzip # handle .zip archives - dnsutils # dig, nslookup - fzf # fuzzy finder - tree # visualize directories - bat # cat with syntax highlighting - net-tools # old ifconfig, netstat (legacy but familiar) tasks: - name: Install base tools apt: name: "{{ base_packages }}" state: present update_cache: yes - name: Install extra tools apt: name: "{{ extra_packages }}" state: present