Files
dsk-iac/ansible/01_old/roles/datadog.datadog/tasks/pkg-redhat/install-pinned.yml
2023-12-19 13:36:16 +09:00

22 lines
860 B
YAML

---
- name: Install pinned datadog-agent package (dnf)
dnf:
name: "{{ datadog_agent_flavor }}-{{ datadog_agent_redhat_version }}"
update_cache: yes
state: present
allow_downgrade: "{{ datadog_agent_allow_downgrade }}"
register: datadog_agent_install
when: not ansible_check_mode and ansible_pkg_mgr == "dnf"
notify: restart datadog-agent
- name: Install pinned datadog-agent package (yum)
yum:
# We have to add architecture, because yum only understands epoch when architecture is also specified
name: "{{ datadog_agent_flavor }}-{{ datadog_agent_redhat_version }}.{{ ansible_facts.architecture }}"
update_cache: yes
state: present
allow_downgrade: "{{ datadog_agent_allow_downgrade }}"
register: datadog_agent_install
when: not ansible_check_mode and ansible_pkg_mgr == "yum"
notify: restart datadog-agent