---
- name: Converge
  hosts: all
  tasks:
    - name: Update Package Cache (apt/Ubuntu)
      become: true
      ansible.builtin.apt:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "Ubuntu"

    - name: Update Package Cache (dnf/CentOS)
      become: true
      ansible.builtin.dnf:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "CentOS"

    - name: Update Package Cache (yum/Amazon)
      become: true
      ansible.builtin.yum:
        update_cache: yes
      changed_when: false
      when: ansible_distribution == "Amazon"

    - name: "Include geoip"
      ansible.builtin.include_role:
        name: "geoip"
