Ansible Script 추가

This commit is contained in:
ByeonJungHun
2023-12-19 13:36:16 +09:00
parent 0273450ff6
commit 05cb8d9269
2610 changed files with 281893 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
---
- 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