---
- name: Install latest datadog-agent package
  apt:
    name: "{{ datadog_agent_flavor }}"
    state: latest  # noqa 403
    update_cache: yes
    cache_valid_time: "{{ datadog_apt_cache_valid_time }}"
  register: datadog_agent_install
  when: not ansible_check_mode
